Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

A Unified Approach to Routing and Cascading for LLMs

Cascade routing merges routing and cascading into one model selection strategy

  • Problem Routing makes one final model choice, and cascading forces every query through the whole chain. Their theory also lacks optimality guarantees.
  • Method Cascade routing merges both paradigms, so each step picks among chains of models already run instead of one fixed choice.
  • Results On RouterBench with eleven models at low noise, cascade routing scored an AUC of 87.24, compared to 83.25 for routing.

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

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

Original paper · CC BY 4.0 · Jasper Dekoninck, Maximilian Baader, Martin Vechev · A Unified Approach to Routing and Cascading for LLMs · Original paper figure · Extracted the figure area from page 22 of the original PDF.

Why routing and cascading stall

Model selection tries to send each query to a model that answers well enough at a cost the budget allows. Routing and cascading are the two standard paradigms for this, and each one restricts the process in its own way. In routing, the initial selection of a model is final, so the strategy can't reconsider after the first decision. In cascading, each query must pass through every model in the chain, and there is no option to skip a model.

A less restrictive strategy that combines both could therefore offer significant performance improvements.

The theory behind both paradigms lags behind their practical use. The theoretical analysis of cascading, in contrast, doesn't provide optimality guarantees (Chen et al., 2023; Varshney & Baral, 2022). Prior work also doesn't explain the limitations of these strategies.

Practitioners can't tell when either paradigm actually pays off, which makes the choice between them a guess. The authors address this gap by first deriving optimal routing and cascading strategies as linear optimization problems. Their goal is to maximize output quality while staying within a given cost budget. Cascade routing then combines both paradigms, with routing and cascading as special cases of it (Figure 1).

Routing as a linear optimization

The key idea is to let the router output a probability distribution over models instead of one hard choice, and to set that distribution by a linear trade-off between predicted quality and cost. A routing strategy is a function \(s:\mathcal{X}\to\Delta_k\) that maps a query to a distribution over the k models, and the router samples its choice from that distribution.

Since true quality and cost are unknown, the router works with estimates \(\hat q_i(x)\) and \(\hat c_i(x)\), built from small classifiers and from token-based or latency-based cost measures. For a fixed \(\lambda\), each model gets the score \(\tau_i(x,\lambda)=\hat q_i(x)-\lambda\hat c_i(x)\), and the highest score wins.

When several models tie for the top score, the authors pick the cheapest tied model with probability \(\gamma\) and the most expensive one otherwise. Because \(\gamma\) is often neither 0 nor 1, the optimal rule is generally probabilistic. Prior work restricted routing to deterministic choices, so it can't express this optimum and falls back on the cheapest near-optimal model.

Theorem 1 says that such a \(\lambda\) and \(\gamma\) exist for any cost budget B.

A two-model example shows how the mixing plays out. Model m1 costs 0.9 and m2 costs 1, and the quality estimates depend on whether a query is math, code or generic. At \(\lambda = 1\) and \(\gamma = 0.7\), the router picks m1 on math, m2 on code, and on generic queries it picks m1 with probability 0.7. This only works if the quality estimates match the true qualities, so the authors treat ex-ante quality estimation as the critical part of routing.

Cost estimates matter less, the authors found, and are easier to approximate.

Cascading as a sequence of routing decisions

Each cascade step becomes a routing decision once the models are grouped into supermodels, which are fixed chains that act like one model. At step j, the cascade either stops and returns the output of the best supermodel M_{1:j-1}, or it continues by running m_j. Supermodels M_{1:j} through M_{1:k} all mean continuing, yet they still count, because a weak m_j can hide a strong m_{j+1}.

The cost of a supermodel is simply the sum of its member costs, so the cost of M_{1:i} adds up its first i models. Its quality is the expected value of the maximum member quality, since the strongest member can fail while another member succeeds. The authors measure the spread of these estimates as the variance of the difference between quality estimates at step j and step k over a validation dataset.

Ignoring that spread would wrongly treat a supermodel as always matching its best member.

Theorem 2 writes the optimal cascade as a per-step mix of a minimum-cost rule and a maximum-cost rule, with one λ_j per step and one shared γ. The budget applies to the whole cascade, while the λ_j and γ are tuned on a validation dataset. Take two models with costs (0.5, 1) and qualities (0.5, 0.8), ignoring uncertainty, before any output is seen.

After m1 runs and its confidence is only 30%, the estimates update to quality (0.3, 0.6) and cost (1, 2).

With λ2 = 1, the cascade stops and returns the output of m1, because the cost-quality tradeoff is highest for the supermodel {m1}. With λ2 = 0.1, the cascade runs m2, since the tradeoff peaks for the supermodel {m1, m2}. Algorithm 2 packages this decision as a router that compares all remaining supermodels at each step. Corollary 1 shows that the threshold rule used by prior cascades matches this optimal rule only if the costs don't depend on the query and three quality conditions hold.

Where the threshold cascade falls short

Prior cascades approximate the optimal strategy with a threshold rule that compares one estimate against a fixed cutoff. At step j, the cascade keeps going while the latest post-hoc estimate stays below a fixed threshold τ_j. Corollary 1 says the threshold rule matches the optimal cascade under minor technical assumptions, but only if three conditions hold.

The cost estimates for every model must not depend on the query x. The quality estimates for models i at least j must not depend on x either. The quality of a supermodel must equal the estimate for its last model.

Under the threshold rule, the ex-ante estimate is fixed, so it doesn't change any stopping decision. The authors' approach keeps both the ex-ante and the post-hoc estimates, so it can make better-informed stopping decisions. Compared with the threshold cascade, the new cascading strategy improves performance by up to 2%.

So when does a cascade beat direct routing? A cascade pays off only when the post-hoc estimate gives much better information than the ex-ante estimate. If that improvement is minimal, the router should send queries straight to the most suitable model and skip the cascade. Routing fits settings where ex-ante estimates are accurate, while cascading fits settings where post-hoc estimates are accurate.

Cascade routing and pruning the search

Cascade routing keeps the sequential structure of cascading but lets the router pick among every supermodel that starts with the models already run. Definition 5 writes this as a sequence of routing strategies, one per step, where each step routes between all supermodels that start with the j-1 models already computed. Theorem 3 gives the optimal form, with a per-step λj and a shared γ, mixing the minimum-cost and maximum-cost choices.

The step then returns the cheapest unrun model in the chosen supermodel, or stops if no unrun model is left. Models inside the chosen supermodel are sorted by cost, so the cheapest one runs first, which matches how cascading works.

Supermodel quality and cost are order-independent, so supermodels with the same models in a different order get identical scores. The authors reduce this search with negative marginal gains, since the model selection step must stay cheap next to model computation. The marginal gain of a model m with respect to a supermodel M is τ_M(x, λ) minus τ_{M\{m}}(x, λ).

If that marginal gain is strictly negative for a query, the optimal rule never runs a supermodel that contains all models in M. For example, if m1 hurts the supermodel {m1, m2}, every supermodel containing both m1 and m2 is pruned. The authors say this negative contribution is quite common, so pruning removes much of the search space.

A two-model example shows how this differs from cascading, using costs (0.5, 1) and qualities (0.5, 0.8) for m1 and m2. With λ1 = 0.1, the router runs m2 first, while with λ1 = 1 it follows the classic order and runs m1 first. If m2's output turns out poor and its quality estimate drops to (0.5, 0.1), λ2 = 0.1 sends the query back to m1. Cascade routing therefore can reorder models within a query, which a fixed-order cascade cannot do.

RouterBench results: when does cascade routing win?

RouterBench is a benchmark for comparing model selection strategies, and the authors test it with three, five and eleven models. It includes questions from seven benchmarks, such as MMLU, GSM8k and MBPP, with answers from eleven models ranging from GPT-4 to Mistral-7B. The estimates are the true values plus zero-centered Gaussian noise, so the quality estimate is written as W(q(x)+ε)+b with ε drawn from N(0, σ²).

The authors define σ²ante for the noisy signal before model computation and σ²post for the signal after it. Low, medium and high noise levels set these variances, and the exact values are given in §D.1.

Each method is scored by AUC over cost budgets, running from the cheapest model to the most expensive one. The baselines are routing, the threshold-based cascade from Corollary 1, the optimal cascade from Theorem 2, and a linear interpolation on the Pareto frontier. With eleven models at low noise, cascade routing reaches 87.24 AUC, compared to 83.25 for routing and 84.48 for the baseline cascade.

The gap narrows under higher noise, so the authors read cascade routing as strongest with large model sets and accurate estimates. The new cascade beats the threshold cascade by up to 2%, which supports the cascading result from the theory.

In the noise sweep with five models, the authors compare cascade routing against routing in one panel and against cascading in the other. Routing is hurt mainly by high ex-ante noise, so high σante sharply lowers its AUC relative to cascade routing. Cascading is hurt mainly by high post-hoc noise, and higher σpost causes substantial performance degradation.

Cascade routing stays robust because it uses low σante and low σpost together.

Real-world benchmarks with good and poor estimates

On SWE-Bench, the authors score each response by running it against the ground-truth test cases, which gives accurate post-hoc estimates. Routing doesn't beat the trivial baseline there, since ex-ante quality estimates are insufficient for this benchmark. The baseline cascade falls to 38.52 there, even though its post-hoc estimates are perfect.

The SWE-Bench cost estimator is latency-based, while the Minerva Math and LiveCodeBench estimator uses the cost of generation.

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…

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.

Original paper · CC BY 4.0

For Minerva Math and LiveCodeBench, the authors use the QWEN-2.5 Math and Coder models and add the sample's origin benchmark as a feature. Because the ex-ante estimates are accurate here, routing reaches 58.20 on this setup. Post-hoc estimates are poor on these benchmarks, so cascade routing ties routing at 58.20. The authors' cascade reaches 52.56, compared to 47.03 for the baseline cascade.

The paper says the new cascade uses ex-ante estimates to make informed decisions, while the baseline cascade relies on a fixed threshold.

Classification and open-form tasks have no known accurate quality estimator, so the authors use the log-probability estimator from Gupta et al. (2024). With LLAMA and GEMMA, cascade routing performs on par with or above all baselines, with margins of up to 1.2%. On LLAMA classification, cascade routing scores 75.52, compared to 74.92 for routing.

The authors attribute the smaller gains to very noisy quality and cost estimates, similar to the high-noise RouterBench settings.

Limitations: what bounds the evidence for cascade routing

RouterBench evaluates cascade routing with simulated estimates, because quality and cost are true values plus zero-centered Gaussian noise. The variances of that noisy signal are set separately for ex-ante estimates and post-hoc estimates. So the RouterBench results measure how estimate quality affects the strategies, not the accuracy of a real predictor.

Across noise levels, cascade routing keeps its lead, but the gap narrows as noise increases. The authors tie this narrowing to noisy estimates, which is why they test under a broader range of noise levels with five models. Cascade routing gains are largest when ex-ante and post-hoc estimates are both low-noise.

On Minerva Math and LiveCodeBench, cascade routing performs on par with routing. The authors attribute this to poor post-hoc quality estimation on these benchmarks. The QWEN models use the sample's origin benchmark as a feature, so their ex-ante estimates are accurate.

Its margin reaches only up to 1.2% on these benchmarks. The authors attribute the narrow margin to very noisy quality and cost estimates.

On SWE-Bench, the post-hoc quality signal comes from testing responses on the ground-truth test cases. Its cost estimator is latency-based, which means cascade routing adapts to a different cost definition than on Minerva Math. The paper's evidence therefore depends on these estimator choices, and the authors don't test other estimators on the same tasks.

Paper info

Authors
Jasper Dekoninck, Maximilian Baader, Martin Vechev
Venue
arXiv · Preprint
First published
2024-10-14
Added
2026-10-31
Updated
2026-10-26
Version
v5
arXiv
2410.10347
Category
cs.CL
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

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.

Quote from the paper

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}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up