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

面向大语言模型的前瞻路由(Lookahead Routing)

Lookahead Routing for Large Language Models

School of Computer Science and Engineering, Sun Yat-sen University, China(中山大学计算机科学与工程学院);Shenzhen Loop Area Institute, China(深圳环湖研究所)

Canbin Huang, Tianyuan Shi, Yuhua Zhu, Ruijun Chen, Xiaojun Quan

AI总结:

针对现有大语言模型路由方法仅依赖输入查询易导致决策次优的问题,提出Lookahead前瞻路由框架,通过预测模型输出隐表示指导选择,在七个基准上较SOTA平均提升7.7%性能。

摘要:

大语言模型(LLM)路由器通过将每个查询导向最合适的模型,同时利用异构大语言模型的多样化优势,提升多模型系统的效率。现有大多数方法将路由构建为仅基于输入查询的分类问题。这类方法虽通过避免在所有模型上执行推理降低了开销,但忽略了可从潜在输出中收集的宝贵信息,且无法捕捉通常仅在响应生成过程中显现的隐含意图或语境细微差别。这些局限会导致路由决策次优,尤其针对需要更深层语义理解的复杂或模糊查询。为解决这一挑战,我们提出Lookahead路由框架,该框架通过预测潜在模型输出的隐表示来“预见”这些输出,并利用这些预测指导模型选择,从而在无需完整推理的情况下实现更明智的路由决策。在该框架内,我们实现了基于因果语言模型和掩码语言模型的两种方法。在涵盖指令遵循、数学推理和代码生成的七个公开基准上的实证评估表明,Lookahead始终优于现有路由基线,较当前最优方法平均性能提升7.7%。我们的代码可在https://github.com/huangcb01/lookahead-routing获取。

英文摘要:

Large language model (LLM) routers improve the efficiency of multi-model systems by directing each query to the most appropriate model while leveraging the diverse strengths of heterogeneous LLMs. Most existing approaches frame routing as a classification problem based solely on the input query. While this reduces overhead by avoiding inference across all models, it overlooks valuable information that could be gleaned from potential outputs and fails to capture implicit intent or contextual nuances that often emerge only during response generation. These limitations can result in suboptimal routing decisions, particularly for complex or ambiguous queries that require deeper semantic understanding. To address this challenge, we propose Lookahead, a routing framework that "foresees" potential model outputs by predicting their latent representations and uses these predictions to guide model selection, thus enabling more informed routing without full inference. Within this framework, we implement two approaches based on causal and masked language models. Empirical evaluations across seven public benchmarks - spanning instruction following, mathematical reasoning, and code generation - show that Lookahead consistently outperforms existing routing baselines, achieving an average performance gain of 7.7% over the state-of-the-art. Our code is available at https://github.com/huangcb01/lookahead-routing.

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

↑