TL;DR
LOCUS introduces an attention-based framework that maps a Large Language Model’s (LLM) capabilities into a low-dimensional vector space using only black-box query-correctness scores. By replacing brittle, gradient-based optimization with a deterministic forward pass, it enables training-free onboarding of new models, highly sample-efficient query routing, and a geometrically stable space for model comparison and portfolio selection.
What Problem Does This Paper Address?
As the LLM ecosystem explodes with thousands of open-source and proprietary models, managing and utilizing this vast pool effectively has become a major challenge. How do we compare models across entirely different architectures? How do we route a specific query to the best-suited model without paying the massive computational cost of evaluating every option?
Prior attempts to create "model embeddings" fall into two flawed camps:
- Parametric approaches treat embeddings as learnable parameters optimized via Stochastic Gradient Descent (SGD). Because these are overparameterized, different training runs yield completely different embeddings for the same data, making distance-based analysis (like clustering or similarity search) incredibly brittle. Furthermore, adding a new model requires retraining.
- Nonparametric approaches use fixed geometric operations but require every single model to be evaluated on the exact same fixed set of queries, failing to generalize to partial or dynamic evaluations.
LOCUS bridges this gap by creating a black-box compatible, sample-efficient, and training-free embedding generator that produces stable, geometrically meaningful representations.
Methods
LOCUS (LOw-dimensional embeddings for Model Capability UnderStanding) splits the problem into two components: a Model Embedding Generator ($F_\theta$) and a Query Correctness Predictor ($G_\psi$).
- Continuous Tokenization: For a given model, individual query evaluations—consisting of a query encoding $\phi(x)$ and a correctness score $y(x)$—are mapped into a continuous token space via a lightweight Multi-Layer Perceptron (MLP).
- Latent Bottleneck Attention: To avoid the $O(n^2)$ computational complexity of standard self-attention over thousands of evaluation queries, LOCUS introduces a small set of learned latent vectors ($r \ll n$) that act as an attention bottleneck, reducing the complexity to $O(n \times r)$.
- Permutation Invariance: The architecture uses bidirectional attention without positional encodings. A final learned-query attention layer aggregates the tokens into a single fixed-dimensional vector ($z_m$). This ensures that the final model embedding depends strictly on the content of the evaluation set, not the order in which queries were processed.
- Correctness Predictor: A separate decoder network takes the generated model embedding ($z_m$) and a new, unseen query encoding to predict the probability that the model will answer correctly.
Crucially, once the encoder is trained, embedding a brand-new model requires no retraining or gradient steps—it is simply a deterministic forward pass over its available evaluation scores.
Datasets
The authors evaluated LOCUS using a massive dataset of model-query evaluations from prior work, spanning 112 language models of various sizes and families. The queries were sampled from 10 diverse public benchmarks:
- Math & Reasoning: MathQA, GSM8K, ASDiv, GPQA
- General Knowledge & Logic: MMLU, LogiQA
- Medical Domain: MedMCQA
- Commonsense & Social Reasoning: PIQA, TruthfulQA, SocialQA
Query representations were generated using standard sentence encoders, primarily all-mpnet-base-v2.
Key Insights and Ideas
- The Power of Set-Based Attention: By treating model evaluation as an unordered set of tokens, LOCUS naturally enforces permutation invariance. This makes the embedding robust to variations in how a model is evaluated.
- Bypassing SGD Randomness: Traditional learnable embeddings shift around depending on the random seed of the optimization process. Because LOCUS generates embeddings deterministically via an encoder, the resulting embedding space is geometrically stable and reliable for downstream tasks.
- Proximity Equals Similarity: The embedding space is highly conformal to actual model behavior. The distance between two models in the LOCUS vector space correlates strongly with their actual disagreement rate on test queries.
Key Results
- Superior Sample Efficiency: LOCUS achieves state-of-the-art query routing accuracy while requiring 2.3× to 4.8× fewer query evaluation samples than gradient-based baselines like EmbedLLM and IRT-Net.
- Instant Onboarding: For previously unseen models, evaluating them on as few as $\approx 128$ random queries is enough to generate highly informative embeddings that allow accurate performance prediction.
- Model Portfolio Optimization: Using simple geometric clustering (like $k$-medoids) within the embedding space, the authors showed that a subset of just 15 models could preserve the aggregate routing accuracy of the entire 112-model pool, drastically reducing deployment redundancy.
- Resilient Fallback Routing: If a preferred model becomes unavailable (due to API downtime or server congestion), routing the query to its nearest neighbor in the LOCUS embedding space retains up to 85% of the original routing performance.
Limitations and Future Work
While LOCUS demonstrates powerful capabilities for text-based LLMs, the authors note a few areas for future exploration:
- Multimodal Extensions: The current framework relies on text-based query encoders and binary correctness scores. Extending this to vision-language or audio models remains an open direction.
- Adaptive Query Evaluation: Instead of using a random subset of queries to embed a new model, future iterations could use active learning to adaptively select the most informative queries, reducing the required sample size even further.
Summary updated