RouteWeaver: Weaving Mode Selection and Execution into Unified LLM Routing

Xiaohan Wang, Haozhen Zhang, Qingyuan Liu, Tao Feng, Wenya Wang

arXiv:2610.19705 · 2026-10-24 공개 · arXiv · PDF

multi-task-learning unified-framework llm-routing knowledge-reasoning adaptive-routing mode-selection comet-grpo progressive-exploration

Abstract

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.

한국어 요약

한 줄 요약

RouteWeaver는 단일 LLM 정책 내에서 다양한 라우팅 모드를 통합하여 모드 선택과 실행을 동시에 학습하는 통합 LLM 라우팅 프레임워크이다.

핵심 기여도

핵심 아이디어

기존 LLM 라우팅은 single-round, multi-round, agentic 등 고정된 실행 패러다임에 의존하여, 모델 선택은 유연하지만 실행 구조는 고정되어 있었다. RouteWeaver는 이러한 제한을 극복하기 위해, 모드 선택과 within-mode 실행을 **단일 정책 내에서 동시에 학습**하는 통합 라우팅 프레임워크를 제안한다. 핵심 아이디어는 다음과 같다:

1. **COMET-GRPO (Coordinated Mode-Execution Training with GRPO)**: GRPO 기반의 강화 학습에서 trajectory-level advantage를 모드 선택과 within-mode 실행으로 분리하여, 각 결정 단계에 맞는 신호를 제공함으로써 **더 정확한 신용 할당**을 가능하게 한다.
2. **Progressive exploration**: 초기에는 외부에서 모드를 지정하여 실행 방법을 학습하고, 점차적으로 모드 선택을 자율적으로 하도록 유도함으로써, **모드 선택과 실행의 조화**를 학습한다.

이러한 접근은 기존 고정된 실행 패러다임을 벗어나, 다양한 쿼리에 따라 실행 구조를 유연하게 조정할 수 있는 라우팅 정책을 가능하게 한다.

기술적 접근법

주요 결과

의의 및 한계

RouteWeaver는 LLM 라우팅에서 실행 구조와 모델 선택을 동시에 학습하는 새로운 패러다임을 제시하며, 기존 고정된 실행 모드를 벗어난 유연한 라우팅 정책을 가능하게 한다. 특히, COMET-GRPO와 progressive exploration의 조합이 **적응형 라우팅 성능 향상에 핵심적인 역할**을 한다는 점에서 학술적 의의가 크다.

그러나, 본 연구는 **현재까지는 5개 도메인에만 적용**되었으며, 더 복잡한 실행 구조나 도구 기반 환경으로 확장하는 것은 향후 연구 과제로 남아 있다. 또한, 라우팅 정책의 **자율성과 정확도 간의 균형**을 유지하는 것도 중요한 한계점이다.

실용적 활용

RouteWeaver는 다양한 도메인에서 모델 선택과 실행 구조를 유연하게 조정할 수 있어, **복합적인 쿼리 처리가 필요한 산업**(예: 고객 지원, 데이터 분석, 콘텐츠 생성)에서 유용하게 활용될 수 있다. 특히, **비용 효율성과 정확도를 동시에 고려해야 하는 실시간 시스템**에서 적응형 라우팅 정책을 구현하는 데 기여할 수 있다.