# A Unified Approach to Routing and Cascading for LLMs

LLM을 위한 라우팅과 캐스케이딩의 통합 접근법

Jasper Dekoninck, Maximilian Baader, Martin Vechev · arXiv · 2024년 10월 14일

- **연구 문제** 라우팅과 캐스케이딩은 모델 선택의 비용과 성능 균형을 맞추지만, 각각 재선택이나 건너뛰기를 허용하지 않고 최적성 보장도 부족했습니다.
- **연구 방법** 라우팅과 캐스케이딩을 선형 최적화로 정식화하고, 두 방식을 통합한 캐스케이드 라우팅을 제안합니다. 이 방식은 이미 실행된 모델을 포함하는 수퍼모델들 사이에서 다음 실행을 선택합니다.
- **주요 결과** RouterBench에서 캐스케이드 라우팅은 비교한 기준 전략보다 높은 AUC를 보였고, 모델 수가 많을수록 차이가 커졌습니다. 정확한 사후 품질 추정이 있는 SWE-Bench에서는 기준 전략을 최대 14%까지 능가했습니다.

## 라우팅과 캐스케이딩의 한계

여러 대형 언어 모델을 선택하는 전략은 비용과 성능의 균형을 맞추는 데 쓰입니다. 대표적인 방식은 라우팅과 캐스케이딩입니다. 라우팅은 쿼리마다 모델 하나를 고르고, 그 선택이 최종 결정으로 남아 나중에 다시 바꿀 수 없습니다. 캐스케이딩은 작은 모델부터 점점 큰 모델을 순서대로 실행하며, 모든 모델을 거쳐야 하고 특정 모델을 건너뛸 수 없습니다. 두 방식 모두 이러한 제약 때문에 성능을 더 높일 여지가 있습니다. 또한 기존 연구에서 라우팅의 최적성은 긴 증명을 거쳐야 가까운 수준에 있음을 보일 수 있었고, 캐스케이딩 분석은 최적성 보장을 제공하지 못했습니다. 이 연구는 이 두 방식의 최적 전략을 정식화하고, 두 방식을 함께 쓰는 방법의 최적성을 다룹니다.

## 최적 라우팅의 정식화

최적 라우팅에서는 입력 쿼리 x의 분포 위에서 선택된 모델의 기대 추정 품질을 최대화하되, 선택된 모델들의 기대 추정 비용이 예산 B를 넘지 않도록 제한합니다. 각 모델 i에 대해 추정 품질 q̂\_i(x)와 추정 비용 ĉ\_i(x)를 사용하며, 선택 확률은 확률 분포로 정의됩니다. 최적해는 각 쿼리에서 \\( \\tau\_i(x,\\lambda)=\\hat q\_i(x)-\\lambda \\hat c\_i(x) \\)를 최대화하는 모델을 고르는 구조로 나타납니다. λ는 품질과 비용의 균형을 정하는 값입니다. 여러 모델이 같은 최대값을 가지면 가장 저렴한 모델과 가장 비싼 모델을 γ 비율로 나누어 선택하며, 이때 비용 예산은 검증 데이터셋으로 맞춥니다.

이 선택은 결정적 전략만으로는 표현되지 않으므로, 기존의 결정적 라우팅 전략은 최적에 근사하는 전략으로만 설명됩니다. 이 정리는 특정 cost budget B와 추정치가 주어진 조건에서 성립합니다.

## 캐스케이딩의 순차 라우팅 재해석

이 연구는 캐스케이딩을 단계별 라우팅 문제의 연속으로 다시 봅니다. 단계 j에서는 이미 실행된 모델들로 구성된 수퍼모델들 사이에서 어느 쪽이 가장 좋은지 판단합니다. 현재 최적 수퍼모델이 이전 단계까지의 결과이면 캐스케이드를 중단하고, 더 나은 수퍼모델이 있으면 다음 모델을 실행합니다. 수퍼모델의 품질은 구성 모델 품질의 기대 최댓값으로, 비용은 구성 모델 비용의 합으로 정의됩니다. 기존의 임계값 캐스케이드는 이전 모델의 품질 추정치가 임계값보다 낮을 때 계속 실행하는 방식입니다. Corollary 1은 이 방식이 제안한 최적 캐스케이딩과 동일해지는 조건으로, 비용 추정이 쿼리에 독립적인 것, 단계 이후 품질 추정이 쿼리에 독립적인 것, 그리고 누적 품질이 개별 모델 품질과 같다는 것을 제시합니다.

이 조건은 임계값 전략이 특수한 경우임을 보이는 데 쓰이며, 그 밖의 설정에서는 최적성이 보장되지 않습니다.

## 캐스케이드 라우팅의 구조

캐스케이드 라우팅(cascade routing)은 단계 j에서 이전 단계까지 실행된 모델을 모두 포함하는 가능한 수퍼모델 전체를 후보로 삼습니다. 따라서 캐스케이딩처럼 고정된 순서를 따르지 않고, 다음에 실행할 모델을 동적으로 고릅니다. 수퍼모델이 같은 모델을 다른 순서로 포함하더라도 비용과 품질이 같으므로, 선택된 수퍼모델 안의 모델은 비용이 낮은 것부터 실행합니다. 다만 후보 수가 최대 2의 k제곱까지 커지므로, Negative Marginal Gain 보조정리를 사용해 어떤 모델이 품질-비용 트레이드오프를 음의 한계 이득으로 낮추면 그 모델을 모두 포함하는 상위 수퍼모델을 탐색에서 제외합니다. 수퍼모델 품질의 기대 최댓값 함수는 submodular 성질을 가지며, 이 성질이 제거 규칙의 근거로 제시됩니다.

제안 방법은 이러한 구성으로 라우팅과 캐스케이딩을 모두 일반화합니다.

## 품질 추정의 역할

이 연구는 모델 선택 전략의 효과가 품질 추정의 정확도에 크게 좌우된다고 분석합니다. 라우팅은 모델이 쿼리에서 잘 수행할지를 응답 생성 전에 예측하는 ex-ante 품질 추정에 의존합니다. 반면 캐스케이딩은 응답을 생성한 뒤 그 품질을 평가하는 post-hoc 품질 추정이 충분히 정보가 있을 때 유리합니다. 저자들은 이 구분을 근거로, 두 추정치를 함께 쓰는 캐스케이드 라우팅이 잡음이 적은 조건에서 두 방식의 장점을 결합한다고 해석합니다. 이 해석은 저자의 분석이며, 실험에서는 잡음 수준을 바꾸어 이를 확인합니다.

## RouterBench에서의 비교

RouterBench에서는 zero-shot 설정으로 3개, 5개, 11개 모델 설정과 low, medium, high 잡음 수준에서 AUC를 비교합니다. 여기서 AUC는 비용 예산별 품질-비용 곡선 아래 면적입니다. 캐스케이드 라우팅은 Table 1에서 선형 보간, 라우팅, 임계값 캐스케이드 기준선보다 높은 AUC를 보고하며, 저자들은 신뢰구간 기준에서도 기준선이 그 아래에 있다고 밝힙니다. 예를 들어 11개 모델과 low 잡음 설정에서 캐스케이드 라우팅은 87.24, 3개 모델과 low 잡음 설정에서는 82.36입니다. 저자들은 선형 보간 대비 상대 개선이 13%에서 80% 사이라고 보고하며, 모델 수가 많을수록 차이가 커지고 잡음이 커질수록 차이가 줄어든다고 설명합니다.

부록 H의 5-shot 표에서는 저잡음 일부 설정에서 제안 캐스케이딩 전략이 임계값 기준선보다 낮게 나타나며, 저자들은 이를 하이퍼파라미터 최적화 표면과 품질 추정치 불일치로 설명합니다. 이 결과는 RouterBench의 설정에 한정됩니다.

![Table 1: AUC scores in%for different strategies on RouterBench across model and noise levels. All baselines are always worse than the95%confidence intervals of…](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-4c9d02e23b2810bbad9a7af09379d865.png?thumb=512)

**Table 1** : AUC scores in%for different strategies on RouterBench across model and noise levels. All baselines are always worse than the95%confidence intervals of cascade routing. For a discussion on confidence intervals, we refer to §E.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

![Table 3: Standard deviations of the noise levels on the RouterBench dataset](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-ee367c44c34f06a1c0965067a55102ea.png?thumb=512)

**Table 3** : Standard deviations of the noise levels on the RouterBench dataset.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 19쪽에서 그림 영역을 추출했습니다.

![Table 4: AUC scores in%for different strategies on RouterBench in the0-shot setting with2σconfidence intervals](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-6b6cbfd87580d35e3d3970bd0753a54d.png?thumb=512)

**Table 4** : AUC scores in%for different strategies on RouterBench in the0-shot setting with2σconfidence intervals.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 21쪽에서 그림 영역을 추출했습니다.

![Table 10: AUC scores in%for different strategies on RouterBench across model and noise levels for five-shot evaluation. Highest numbers are bolded, underlined…](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-cfcd4f5e85df71f87622f6c73bd30658.png?thumb=512)

**Table 10** : AUC scores in%for different strategies on RouterBench across model and noise levels for five-shot evaluation. Highest numbers are bolded, underlined numbers are within the95%confidence intervals of the highest number. For a discussion on confidence intervals, we refer to §E.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 24쪽에서 그림 영역을 추출했습니다.

## 실제 벤치마크에서의 검증

실제 벤치마크 실험은 품질 추정이 정확한 경우와 잡음이 많은 경우를 구분합니다. SWE-Bench에서는 테스트 케이스를 통한 사후 품질 추정이 정확하다고 가정하고, 비용은 과제 완료 시간으로 정의합니다. 이 설정에서 제안 방법들은 기준 전략을 최대 14%까지 능가하지만, 라우팅은 ex-ante 품질 추정이 부족해 기준 전략과 비슷하게 나타납니다. Minerva Math와 LiveCodeBench에서는 샘플의 출처 벤치마크를 특징으로 넣어 ex-ante 품질 추정을 정확하게 만든 뒤 Qwen 모델 계열을 평가합니다. 이때 라우팅이 강하게 작동하고, 캐스케이드 라우팅은 사후 추정이 약해 라우팅과 비슷한 수준을 보입니다.

저자들은 이 결과가 캐스케이드 라우팅이 두 종류의 추정치에 맞춰 조정된다는 것을 보여준다고 해석합니다. 분류와 개방형 추론 과제는 정확한 품질 추정기가 없는 경우로, 로그 확률 기반 추정기를 씁니다. 여기서 캐스케이드 라우팅은 기준 전략과 같거나 더 높은 성능을 보이지만 차이는 최대 1.2%로 작습니다.

![Table 2: AUC scores on practical benchmarks. On the left, resp. right, side we show the benchmarks with good, resp. poor, quality estimates. The highest number…](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-94152bebf386f9c609723ad9716f17e6.png?thumb=512)

**Table 2** : AUC scores on practical benchmarks. On the left, resp. right, side we show the benchmarks with good, resp. poor, quality estimates. The highest numbers are bolded, and underlined numbers are within the95%confidence intervals of the highest number. For a discussion on confidence intervals, refer to §E. In §G, we present benchmark-specific AUC values for results averaged over several benchmarks.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

![Table 6: AUC scores on the realistic benchmarks with2σconfidence intervals. Bold numbers indicate that the confidence interval contains zero](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-01b558795017650d283fd0490efe3873.png?thumb=512)

**Table 6** : AUC scores on the realistic benchmarks with2σconfidence intervals. Bold numbers indicate that the confidence interval contains zero.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 22쪽에서 그림 영역을 추출했습니다.

![Table 8: Classification AUC values for each benchmark separately for the experiment performed in §5.2](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-78198233e8d117950d4fce8651360c9d.png?thumb=512)

**Table 8** : Classification AUC values for each benchmark separately for the experiment performed in §5.2.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 23쪽에서 그림 영역을 추출했습니다.

![Table 9: Open-form AUC values for each benchmark separately for the experiment performed in §5.2](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-23651072f30775ed91d2e97f32df2ebb.png?thumb=512)

**Table 9** : Open-form AUC values for each benchmark separately for the experiment performed in §5.2.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 23쪽에서 그림 영역을 추출했습니다.

## 적용 범위와 한계

이 결과의 적용 범위는 실험에 사용한 벤치마크, 모델 계열, 추정기 설계로 제한됩니다. RouterBench의 잡음 실험은 실제 추정기를 학습하지 않고 정답에 잡음을 더해 만든 설정입니다. 분류와 개방형 추론 실험에서 품질 추정이 매우 잡음이 많아 얻어진 이득은 최대 1.2%로 작으며, 저자들은 이를 추정치의 잡음 때문으로 해석합니다. 또한 캐스케이드 라우팅은 수퍼모델 탐색 비용이 있어 계산 시간과 성능의 균형이 필요합니다. 부록 F에서는 GREEDY와 NO-EXPECT 변형이 더 빠르지만 저잡음과 중잡음 설정에서 성능이 0.5%에서 1.3% 낮다고 보고합니다. 따라서 최적성 증명은 주어진 가정 아래의 이론적 결과이며, 실제 추정기 품질에 대한 보장은 아닙니다.

![Table 7: AUC scores and average runtime for variations of cascade routing on RouterBench when using all eleven models](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-9eab9e66a71efffaecac90dc375b9b75.png?thumb=512)

**Table 7** : AUC scores and average runtime for variations of cascade routing on RouterBench when using all eleven models.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 22쪽에서 그림 영역을 추출했습니다.

![Figure 3: Runtime of cascade routing vari- ants for different numbers of models](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb/figures/figure-d29cf2d62e3f98c05fe9e49c3c93fe9c.png?thumb=512)

**Figure 3** : Runtime of cascade routing vari- ants for different numbers of models.

[원문](https://arxiv.org/abs/2410.10347v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · 원문 그림 인용 · 원본 PDF 22쪽에서 그림 영역을 추출했습니다.

## 논문 정보

- **저자**: Jasper Dekoninck, Maximilian Baader, Martin Vechev
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2024년 10월 14일
- **등록일**: 2026년 10월 31일
- **수정일**: 2026년 10월 26일
- **버전**: v5
- **arXiv**: 2410.10347
- **분류**: cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2410.10347v5) · [원문 PDF ↗](https://arxiv.org/pdf/2410.10347v5)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

The availability of a wide range of large language models (LLMs) embedded in various agentic systems has significantly increased the potential of model selection strategies to improve the cost-performance tradeoff. Existing strategies involve either routing, where a single model is chosen per query, or cascading, which sequentially runs increasingly larger models until a satisfactory answer is found. However, current approaches face three key limitations: they (1) lack formal proofs of optimality, (2) fail to identify the conditions under which these strategies are most effective to improve the cost-performance tradeoff, and (3) are unable to combine both paradigms for further improvements. To address these issues, we first derive a novel optimal strategy for cascading and prove the optimality of an existing routing strategy. Further, we propose cascade routing, a unified framework that integrates routing and cascading into a theoretically optimal strategy. Through our analysis, we identify good quality estimators as the critical factor for the success of model selection paradigms. Finally, in our experiments, we show that cascade routing consistently outperforms the individual approaches by a large margin and we analyze quality estimators to determine when routing and/or cascading are useful paradigms for model selection.

## 원문 인용

Jasper Dekoninck, Maximilian Baader, Martin Vechev (2024). A Unified Approach to Routing and Cascading for LLMs. arXiv:2410.10347v5. https://arxiv.org/abs/2410.10347v5

**BibTeX**

```
@misc{dekoninck2024unified,
  title = {{A Unified Approach to Routing and Cascading for LLMs}},
  author = {Jasper Dekoninck and Maximilian Baader and Martin Vechev},
  year = {2024},
  eprint = {2410.10347},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.10347v5}
}
```

## 이 논문의 용어

- [AUC](https://refivu.com/terms/017a335bbf0e-auc)
- [SWE-Bench](https://refivu.com/terms/d2a8e736795c-swe-bench)
- [Area Under the Curve (AUC)](https://refivu.com/terms/ac2f03bbbd4f-area-under-the-curve-auc)
- [RouterBench](https://refivu.com/terms/ff8c1ae198fb-routerbench)
- [submodular](https://refivu.com/terms/43d00db41b7b-submodular)

## 다른 논문 해설

- [Self-Augmenting Retrieval for Diffusion Language Models](https://refivu.com/papers/c54b0ecc-cda3-4866-9fe4-17476d3585db-self-augmenting-retrieval-for-diffusion-language-models.md)
- [DataDecide: How to Predict Best Pretraining Data with Small Experiments](https://refivu.com/papers/b2e5b927-f525-4063-8956-246603aff1fb-datadecide-how-to-predict-best-pretraining-data-with.md)
- [EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324-evolve-evaluating-and-optimizing-llms-for-in-context.md)
- [ReVISE: Learning to Refine at Test-Time via Intrinsic Self-Verification](https://refivu.com/papers/8a7022a8-6f13-4d37-81ee-6e37932a18ae-revise-learning-to-refine-at-test-time-via.md)
- [PIPA: Preference Alignment as Prior-Informed Statistical Estimation](https://refivu.com/papers/be8524c3-1e28-43de-a955-2a054c1298bb-pipa-preference-alignment-as-prior-informed-statistical.md)
- [Analyze Feature Flow to Enhance Interpretation and Steering in Language Models](https://refivu.com/papers/ef41dce7-1ab8-436d-95f6-309d53881e68-analyze-feature-flow-to-enhance-interpretation-and-steering.md)
- [Intrinsic Distribution Matching](https://refivu.com/papers/2201044a-b6cf-48bb-9c2d-d607c4632e50-intrinsic-distribution-matching.md)
- [WebAnything: From the Wild Web to Scalable Agent Environments](https://refivu.com/papers/9fe33f26-162a-457b-8bc9-4287c8036a61-webanything-from-the-wild-web-to-scalable-agent.md)
- [Multi-Token Prediction Done Right](https://refivu.com/papers/96cce8ac-487a-47a2-8b3b-075193f1d020-multi-token-prediction-done-right.md)
- [Semantic-Enriched Latent Visual Reasoning](https://refivu.com/papers/179da31f-c150-4b65-afdd-c3ac7c092e99-semantic-enriched-latent-visual-reasoning.md)
- [WorkFactory: Turning Professional Intents into Executable Work for Scalable Agent Training](https://refivu.com/papers/7f68f92c-6233-4acb-99f8-60cfed2ea174-workfactory-turning-professional-intents-into-executable.md)
- [Addressing Imbalanced Domain-Incremental Learning through Dual-Balance Collaborative Experts](https://refivu.com/papers/67007668-b220-4a2a-94e9-d2cb4c1d6646-addressing-imbalanced-domain-incremental-learning-through.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/294c4944-64cf-4c2a-8c0d-d1cb8624f2cb-a-unified-approach-to-routing-and-cascading-for)
