PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
September 28, 20250 citationsOpen Access

Cost-Aware Contrastive Routing for LLMs

View Full Paper
RSReza ShirkavandSGShangqian GaoPYPeng Yu

Key Points

  • CSCR improves the accuracy-cost tradeoff by up to 25%, demonstrating significant performance enhancements over baseline methods.
  • The approach employs a k-NN lookup for swift routing, maintaining microsecond latency across varying expert pools.
  • Using embedding techniques, CSCR analyzes prompts and models efficiently, avoiding costly trial-and-error strategies.
  • With compact logit footprints, the model adapts without retraining when the expert set changes, highlighting its flexibility.

Abstract

We study cost-aware routing for large language models across diverse and dynamic pools of models. Existing approaches often overlook prompt-specific context, rely on expensive model profiling, assume a fixed set of experts, or use inefficient trial-and-error strategies. We introduce Cost-Spectrum Contrastive Routing (CSCR), a lightweight framework that maps both prompts and models into a shared embedding space to enable fast, cost-sensitive selection. CSCR uses compact, fast-to-compute logit footprints for open-source models and perplexity fingerprints for black-box APIs. A contrastive encoder is trained to favor the cheapest accurate expert within adaptive cost bands. At inference time, routing reduces to a single k-NN lookup via a FAISS index, requiring no retraining when the expert pool changes and enabling microsecond latency. Across multiple benchmarks, CSCR consistently outperforms baselines, improving the accuracy-cost tradeoff by up to 25%, while generalizing robustly to unseen LLMs and out-of-distribution prompts.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Shirkavand et al. (2025) studied this question.

synapsesocial.com/papers/68d913a34ddcf71ba560b852https://doi.org/10.48550/arxiv.2508.12491
Ask AI
Helpful
Bookmark
Share
View Full Paper