arXiv:2609.00662cs.AISep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.00662

Drift-Aware LLM Routing with Sparse Contexts and Shared Budgets

Cheung Hao Lee, Patrick Wong

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

A multi-model language service must route each request while preserving workload-level budgets for compute, latency, memory, or monetary cost. Two features make this problem materially harder than static model selection. Prompt representations are high dimensional, so only a small subset of embedding directions may predict the incremental value of a model; and both the request mix and the model frontier drift after launches, fine-tunes, quantization changes, and system updates. We formulate nonstationary sparse contextual routing with multiple knapsack constraints and an optional shadow-audit stream that evaluates a small fraction of prompts on several models.

We propose Drift-Aware Sparse Routing (DR-SPARSE). The policy estimates reward and resource use from a rolling audit window, routes using pessimistic reward and optimistic cost estimates, updates resource shadow prices online, and applies a hard meter before commitment. The analysis separates control from statistics. On any event with uniform prediction radii {βt}\{\beta_t\}, regret against a paced dynamic fluid benchmark is bounded by the sum of the radii, a capacity-buffer term, and an O(T)O(\sqrt{T}) pacing term. Under a sparse linear model and bounded drift VTV_T, rolling estimation gives

O~(TsρW+WVT+T),\tilde{O}\Big(T\sqrt{\frac{s}{\rho W}}+W V_T+\sqrt{T}\Big),

where ss is sparsity, ρ\rho is the audit rate, and WW is the window length. Optimizing WW yields the usual stationary O~(sT/ρ)\tilde{O}(\sqrt{sT/\rho}) rate when VT=0V_T = 0 and a O~(T2/3(s/ρ)1/3VT1/3)\tilde{O}(T^{2/3}(s/\rho)^{1/3}V_T^{1/3}) adaptation term under drift.

A reproducible synthetic study with four model classes, two shared budgets, 28-dimensional contexts, and two model updates illustrates the mechanism. Rolling sparse routing retains roughly 97–98% of the clairvoyant policy's utility and improves on a frozen router after the change points, while the resource meter remains feasible. The paper closes with a measurement protocol for real routing panels and a discussion of selective auditing, change detection, and integration with inference schedulers.

1 Introduction

Large language model services increasingly expose a portfolio rather than a single model. A request may be handled by a small local model, a medium generalist, a frontier model, a code specialist, a retrieval pipeline, or a deterministic tool. Routing can substantially reduce cost, but it is not a sequence of independent classifications. The service has shared limits on GPU time, tokens, tail-latency capacity, cache memory, and external API spend. Using the strongest model on one request changes the set of feasible decisions later in the workload.

Production routing is also nonstationary. The prompt mix changes by hour, product surface, customer cohort, and release cycle. A model update can improve coding while worsening verbosity, quantization can change latency without changing benchmark accuracy, and a new retrieval index can alter the relative value of a tool call. A router trained on a dense historical panel may therefore be accurate in an average offline sense while pacing scarce capacity toward the wrong requests after a change.

The statistical difficulty is amplified by representation dimension. Routers commonly use prompt embeddings, predicted length, task labels, user features, and model metadata. The raw feature dimension can be large even when the incremental benefit of a particular model depends on a small number of directions. A dense estimator fitted to a short recent window has high variance; a sparse estimator using the full history has low variance but can average across obsolete regimes. The operational question is therefore not only which model to choose, but how much history to use, which coordinates to trust, and how rapidly the resource prices should react.

This paper develops a modular answer. We formulate a contextual online allocation problem in which expected answer utility and resource use are sparse functions of context and can drift over time. A shadow-audit process reveals counterfactual outcomes on a small fraction of prompts. Such audits may be generated by replaying prompts across approved models, by human or verifier scoring, or by delayed batch evaluation. They need not cover every request, but they provide the common-support data required to distinguish a bad routing decision from a model-quality change.

Our policy, DR-SPARSE, has four components. First, it fits rolling sparse predictors for utility and each resource. Second, it converts statistical uncertainty into a lower confidence estimate of utility and an upper confidence estimate of consumption. Third, it selects the action with the highest uncertainty-adjusted surplus after subtracting current shadow prices. Fourth, it meters the realized action against remaining capacity. This architecture separates the semantic predictor from the online control layer and makes the effect of drift explicit.