用观察数据训练大模型路由,自动选最优模型降成本。
Causal LLM Routing: End-to-End Regret Minimization from Observational Data
- 基于观测数据直接优化路由策略,避免误差累积。
- 新方法在多个基准上超越现有基线,效果领先。
- 适合需要高效低成本部署大模型的场景。
大模型路由旨在为每个查询选择最合适的模型,权衡准确率与成本等指标。以往方法通常分两步:先预测各模型性能,再据此选择。该方式易积累误差,且依赖全反馈数据(即每个查询由所有候选模型评估),实际获取成本高。本文提出一种因果端到端框架,从仅记录实际部署模型结果的观测数据中学习路由策略,通过最小化决策后悔值实现优化。为提升效率,设计两个理论支持的代理目标:基于分类的上界估计,以及软最大加权后悔值近似,后者被证明在收敛时可恢复最优策略。进一步扩展框架以适应异质成本偏好,采用区间条件化架构。在公开基准上的实验表明,该方法优于现有基线,在不同嵌入模型下均达到顶尖性能。
原文摘要 · Abstract (English)
LLM routing aims to select the most appropriate model for each query, balancing competing performance metrics such as accuracy and cost across a pool of language models. Prior approaches typically adopt a decoupled strategy, where the metrics are first predicted and the model is then selected based on these estimates. This setup is prone to compounding errors and often relies on full-feedback data, where each query is evaluated by all candidate models, which is costly to obtain and maintain in practice. In contrast, we learn from observational data, which records only the outcome of the model actually deployed. We propose a causal end-to-end framework that learns routing policies by minimizing decision-making regret from observational data. To enable efficient optimization, we introduce two theoretically grounded surrogate objectives: a classification-based upper bound, and a softmax-weighted regret approximation shown to recover the optimal policy at convergence. We further extend our framework to handle heterogeneous cost preferences via an interval-conditioned architecture. Experiments on public benchmarks show that our method outperforms existing baselines, achieving state-of-the-art performance across different embedding models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。