CopRoute: Dependence-Aware Conformal Routing for Language Models
Abstract
Set-based language model routing aims to increase the coverage of the event where at least one model answers a query correctly while controlling the number of inference calls made. Existing risk-controlled routing policies bound the all-miss risk (the probability that every model in the selected set fails) by calibrating a single conformal threshold and applying it to a nested family of model sets. Because each model is scored in isolation, these policies ignore the dependence structure of model failures. Models that share training data or architecture tend to fail on the same queries, so two individually strong models can be jointly redundant while a weaker but complementary model covers the queries that the others miss. To account for this dependence, which existing risk-controlled policies ignore, we propose CopRoute, which orders models by how many new queries each one answers correctly beyond those already selected, decides per query how far down that order to go, and then picks the smallest cutoff that still meets the target risk. We show that CopRoute's ordering attains, on the design data, the best guarantee any efficient fixed-ordering algorithm can give for the average number of calls to the first correct model, and that a separate calibration step certifies the all-miss risk of the deployed sets. On RouterBench and RouterEval, CopRoute attains the fewest certified calls on nine of ten datasets at a target risk of 0.05 and on eight of ten at 0.10, making up to 79 percent fewer calls (median 24 percent) than the state-of-the-art risk-controlled policy at the same certified all-miss risk.
Figures & tables
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning | Note |
|---|---|---|
| Basic routing objects | ||
| Pool of candidate language models. | is the number of models. | |
| Indices for a labeled query, a model, a prefix depth, and a position inside a prefix, respectively. | The range follows the equation in which an index appears. | |
| A random query and one realized query, respectively. | Uppercase denotes a random variable. | |
| , | Binary indicator that model answers correctly, and the vector of all model outcomes. | . |
| Models that answer query , or labeled query , correctly. | Both are subsets of . | |
| dataset | pool | Ind | Dep | G | P | Flex. | BaRP | Ind | Dep | G | P | Flex. | BaRP |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BBH-boolean | 200 | 2.34 | 2.34 | 4.26 | 4.72 | 4.67 | 2.70 | 1.12 | 1.12 | 2.19 | 3.09 | 1.11 | 1.28 |
| 300 | 2.45 | 2.45 | 4.61 | 5.69 | 2.11 | 3.03 | 1.27 | 1.27 | 2.16 | 3.33 | 1.23 | 1.34 | |
| 500 | 2.79 | 2.79 | 5.78 | 5.81 | 2.86 | 4.50 | 1.40 | 1.40 | 2.89 | 3.95 | 1.40 | 1.49 | |
| BBH-navigate | 200 | 5.02 | 5.02 | 20.7 | 20.1 | 6.34 | 9.14 | 2.39 | 2.39 | 4.14 | 4.30 | 4.94 | 5.39 |
| 300 | 6.82 | 6.82 | 11.7 | 11.0 | 5.77 | 8.94 | 2.09 | 2.09 | 5.22 | 5.86 | 2.45 | 6.09 | |
| pool | .03 | .05 | .075 | .10 | .15 | .20 | |
|---|---|---|---|---|---|---|---|
| 100 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
| 200 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
| 300 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.15 |
| 500 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.05 | 0.30 |
| dataset | Dep Ind | marginal Ind | Dep Ind | marginal Ind |
|---|---|---|---|---|
| ARC | + 0.00 (tie) | +0.12 [-0.06, +0.42] | + 0.00 (tie) | + 0.00 (tie) |
| HellaSwag | + 0.00 (tie) | +0.61 [+0.49, +0.73] | + 0.00 (tie) | +0.02 [ + 0.00, +0.04] |
| MMLU | + 0.00 (tie) | +1.69 [+1.41, +1.93] | + 0.00 (tie) | +0.78 [+0.65, +0.89] |
| WinoGrande | +0.01 [ + 0.00, +0.02] | +2.57 [+2.29, +2.85] | + 0.00 [-0.01, +0.02] | +0.95 [+0.70, +1.22] |
| BBH-boolean | + 0.00 (tie) | +0.16 [-0.30, +0.77] | + 0.00 (tie) | +0.13 [ + 0.00, +0.28] |
| independence-based stopping | dependence-corrected stopping | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| order | all | p11 | p100 | p200 | p300 | p500 | all | p11 | p100 | p200 | p300 | p500 |
| Bernoulli mixture | +0.42 | +0.10 | -0.65 | -0.32 | +0.67 | +2.01 | +0.36 | +0.08 | -0.39 | +0.49 | +0.47 | +0.94 |
| Student-t copula | +1.77 | +0.42 | -0.68 | -0.35 | +3.94 | +4.63 | +1.35 | +0.39 | -0.67 | -0.48 | +3.25 | +3.55 |
| Gaussian copula | +1.97 | +0.54 | -0.09 | +1.08 | +3.35 | +4.13 | +1.81 | +0.55 | -0.10 | +1.59 | +2.97 | +3.33 |
| rank correlation | +2.04 | +0.54 | +0.26 | +0.71 | +3.10 | +4.76 | +1.83 | +0.54 | +0.20 | +1.31 | +2.96 | +3.44 |
| double fault | +1.59 | +0.03 | +0.13 | +0.38 | +3.22 | +3.40 | +1.13 | +0.02 | +0.00 | +0.04 | +2.79 | +2.21 |
| order | ARC | HSwag | MMLU | WinoG | BBH-b | BBH-n | GPQA | IFEval | MATH-a | MuSR |
|---|---|---|---|---|---|---|---|---|---|---|
| independence-based stopping | ||||||||||
| Bernoulli mixture | +0.16 | +0.15 | +0.09 | +0.00 | -0.04 | -2.51 | -0.40 | +4.70 | -0.16 | +1.72 |
| Student-t copula | +0.11 | +0.32 | +0.37 | +0.82 | -0.46 | -1.78 | -1.26 | +4.94 | -0.21 | +12.65 |
| Gaussian copula | +0.14 | +0.34 | +0.47 | +1.18 | -0.03 | -1.17 | -0.79 | +5.26 | -0.28 | +11.83 |
| rank correlation | +0.15 | +0.33 | +0.45 | +1.16 | -0.03 | -1.59 | -1.09 | +5.52 | -0.23 | +13.01 |
| double fault | +0.08 | +0.05 | -0.01 | +0.01 | +1.06 | +3.67 | -7.31 | +5.71 | +2.61 | +5.57 |
| RouterBench (pool 11) | RouterEval (pool 100) | |||||||
|---|---|---|---|---|---|---|---|---|
| policy | ID | OOD | ID | OOD | ID | OOD | ID | OOD |
| CopRoute-Ind | 3.65 | 5.29 | 1.90 | 2.69 | 23.44 | 33.26 | 6.60 | 17.23 |
| CopRoute-Dep | 3.65 | 5.30 | 1.90 | 2.69 | 24.52 | 35.28 | 6.53 | 17.96 |
| RACER-G | 4.81 | 5.44 | 2.89 | 2.91 | 31.91 | 34.81 | 13.73 | 18.50 |
| RACER-P | 5.11 | 5.86 | 3.35 | 3.36 | 32.20 | 34.62 | 15.59 | 18.46 |
| fit call premium | source-calibrated risk inflation | |||
|---|---|---|---|---|
| policy | RouterBench | RouterEval | RouterBench | RouterEval |
| CopRoute-Ind | +0.89 | +16.53 | +0.010 | +0.222 |
| CopRoute-Dep | +0.90 | +18.63 | +0.010 | +0.222 |
| RACER-G | +0.13 | +5.38 | +0.016 | +0.169 |
| RACER-P | +0.06 | -2.04 | +0.015 | +0.165 |
| FlexRouter | +0.19 | +0.09 | +0.002 | +0.140 |
| pool 100 | pool 200 | pool 300 | pool 500 | |
|---|---|---|---|---|
| 0.0 | 10.00 / 0.934 | 10.00 / 0.935 | 10.00 / 0.952 | 10.00 / 0.960 |
| 0.01 | 10.00 / 0.934 | 10.00 / 0.935 | 10.00 / 0.952 | 10.00 / 0.960 |
| 0.05 | 10.00 / 0.934 | 10.00 / 0.935 | 10.00 / 0.952 | 10.00 / 0.960 |
| 0.1 | 10.00 / 0.934 | 10.00 / 0.935 | 10.00 / 0.952 | 10.00 / 0.960 |
| 0.2 | 10.00 / 0.934 | 10.00 / 0.935 | 10.00 / 0.952 | 9.88 / 0.958 |
| 0.3 | 9.99 / 0.934 | 9.99 / 0.935 | 9.76 / 0.951 | 8.70 / 0.947 |
| pool 100 | pool 200 | pool 300 | pool 500 | |
|---|---|---|---|---|
| 0.0 | 10.00 / 0.796 | 10.00 / 0.767 | 10.00 / 0.783 | 10.00 / 0.859 |
| 0.01 | 10.00 / 0.796 | 10.00 / 0.767 | 10.00 / 0.783 | 10.00 / 0.859 |
| 0.05 | 10.00 / 0.796 | 10.00 / 0.767 | 10.00 / 0.783 | 10.00 / 0.859 |
| 0.1 | 10.00 / 0.796 | 10.00 / 0.767 | 10.00 / 0.783 | 10.00 / 0.859 |
| 0.2 | 10.00 / 0.796 | 10.00 / 0.767 | 10.00 / 0.783 | 9.80 / 0.857 |
| 0.3 | 9.99 / 0.796 | 10.00 / 0.767 | 9.66 / 0.782 | 8.90 / 0.851 |
| quality wt. | cost wt. | HellaSwag | MBPP | macro |
|---|---|---|---|---|
| 1.0 | 0.0 | 0.799 / 1.356 | 0.575 / 5.810 | 0.687 / 3.583 |
| 0.9 | 0.1 | 0.799 / 1.356 | 0.575 / 5.810 | 0.687 / 3.583 |
| 0.8 | 0.2 | 0.713 / 0.359 | 0.573 / 5.755 | 0.643 / 3.057 |
| 0.7 | 0.3 | 0.654 / 0.159 | 0.459 / 0.243 | 0.556 / 0.201 |
| 0.6 | 0.4 | 0.563 / 0.149 | 0.449 / 0.227 | 0.506 / 0.188 |
| 0.5 | 0.5 | 0.461 / 0.135 | 0.471 / 0.200 | 0.466 / 0.167 |
| policy | calls | accuracy (%) | cost (USD/1k) | calls | accuracy (%) | cost (USD/1k) |
|---|---|---|---|---|---|---|
| CopRoute-Ind | 7.75 (0.27) | 80.44 (0.19) | 3.41 (0.10) | 2.99 (0.05) | 80.97 (0.18) | 1.90 (0.05) |
| CopRoute-Dep | 7.75 (0.27) | 80.44 (0.19) | 3.41 (0.10) | 2.99 (0.05) | 80.97 (0.18) | 1.90 (0.05) |
| RACER-G | 8.66 (0.10) | 80.19 (0.21) | 4.24 (0.01) | 5.64 (0.07) | 80.18 (0.21) | 3.55 (0.03) |
| RACER-P | 8.64 (0.04) | 80.19 (0.21) | 4.22 (0.01) | 6.45 (0.04) | 80.13 (0.22) | 3.66 (0.02) |
| exact independence | 9.45 (0.18) | 80.19 (0.21) | 4.28 (0.03) | 3.87 (0.07) | 80.19 (0.21) | 2.83 (0.03) |
| cost, USD per 1k queries | cost-weighted minus CopRoute-Ind | |||||
|---|---|---|---|---|---|---|
| dataset | cost-weighted | CopRoute-Ind | RACER-G | cost [CI95] | calls [CI95] | |
| ARC | 0.05 | 0.183 | 0.996 | 1.049 | -0.813 [-0.891, -0.756] | +2.73 [+2.53, +2.92] |
| 0.10 | 0.104 | 0.924 | 0.893 | -0.820 [-0.829, -0.812] | +1.82 [+1.62, +2.00] | |
| HellaSwag | 0.05 | 1.089 | 2.623 | 3.684 | -1.533 [-1.663, -1.409] | +2.66 [+2.46, +2.87] |
| 0.10 | 0.431 | 2.277 | 2.176 | -1.845 [-1.861, -1.830] | +1.44 [+1.35, +1.53] | |
| MMLU | 0.05 | 3.046 | 3.405 | 4.238 | -0.359 [-0.469, -0.247] | +0.71 [+0.45, +0.96] |
| dataset | cascade | CopRoute-Ind | cascade | CopRoute-Ind |
|---|---|---|---|---|
| ARC (pool 11) | 0.093 ∗ | 0.032 | 0.099 | 0.033 |
| GPQA (pool 100) | 0.076 ∗ | 0.066 ∗ | 0.139 ∗ | 0.121 ∗ |
| IFEval (pool 100) | 0.100 ∗ | 0.049 | 0.315 ∗ | 0.095 |
| MATH-algebra (pool 100) | 0.139 ∗ | 0.065 ∗ | 0.350 ∗ | 0.110 ∗ |
| policy | intervention | frozen certificates surviving | certified after refit | mean call change |
|---|---|---|---|---|
| CopRoute-Ind | remove one model | 3.4% (25 of 729) | 63.1% | +1.07 |
| CopRoute-Ind | add one model | 100.0% (729 of 729) | 73.6% | +0.07 |
| CopRoute-Dep | remove one model | 2.2% (16 of 729) | 63.1% | +0.98 |
| CopRoute-Dep | add one model | 100.0% (729 of 729) | 73.6% | -0.02 |
| score transformation | CopRoute-Ind | exact independence | RACER-G |
|---|---|---|---|
| RouterBench MMLU, 11 models | |||
| temperature scaling | -0.01 [-0.03, +0.01] | +0.03 [+0.01, +0.05] | -0.11 [-0.14, -0.08] |
| systematic overconfidence | +0.38 [+0.32, +0.44] | +0.15 [+0.08, +0.21] | +0.46 [+0.41, +0.52] |
| systematic underconfidence | +0.05 [+0.02, +0.09] | +0.17 [+0.10, +0.23] | -0.51 [-0.57, -0.45] |
| Gaussian noise, | -0.01 [-0.02, +0.01] | -0.01 [-0.05, +0.04] | +0.01 [-0.02, +0.05] |
| Gaussian noise, | + 0.00 [-0.01, +0.02] | -0.03 [-0.08, +0.02] | -0.01 [-0.04, +0.02] |
| ground-truth regime | tally | pairwise count | error corr. | latent normal | query-local |
|---|---|---|---|---|---|
| conditional independence, mixed difficulty | 0/15 | 0/15 | 0/15 | 0/15 | 0/15 |
| pooled correlation, no residual dependence | 0/15 | 0/15 | 0/15 | 0/15 | 0/15 |
| redundant families (positive residual) | 10/15 | 14/15 | 12/15 | 10/15 | 13/15 |
| complementary specialists (negative residual) | 8/15 | 6/15 | 6/15 | 0/15 | 15/15 |
| higher-order, pairwise-invisible | 3/15 | 0/15 | 0/15 | 2/15 | 0/15 |