atlas

Research map / Large language models / Language, safety and interpretability

RouterDC: Query-Based Router by Dual Contrastive Learning for Assembling Large Language Models

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data · 16 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes RouterDC, a query-based LLM router trained with a sample-LLM and a sample-sample contrastive loss, which assembles seven 7-8B open LLMs and beats the best single model and prior routers on in-distribution and out-of-distribution tasks.

Problem

Existing LLM routers, trained with KL alignment to normalized scores, perform poorly when multiple LLMs are good for the same query and training is unstable for similar queries.

Approach

Train a small encoder with learnable LLM embeddings using a contrastive loss that pulls queries toward top-K performing LLMs and pushes them from bottom performers, plus a clustering-based contrastive loss that makes similar queries map to similar embeddings.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use RouterDC instead of the strongest individual LLMLLM routing on in-distribution tasks · In-distribution tasks (Avg)accuracy (%): 54.56 -> 58.54Helped
use RouterDC instead of the strongest individual LLMLLM routing on out-of-distribution tasks · Out-of-distribution tasks (Avg)accuracy (%): 43.95 -> 45.85Helped
add the sample-sample contrastive loss (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%): 56.52 -> 58.54Helped
increase the number of clusters from 4 to 7 (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%): 58.56 -> 59.13Helped
use 5 clusters rather than 7 (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%): 59.13 -> 58.54No clear effect
add out-group queries to the sample-sample contrastive loss (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%): 56.52 -> 58.54Helped
replace unsupervised clusters with task-identity groups (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%): 58.54 -> 58.65No clear effect
set scores for incorrect options to 0 (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%): 58.00 -> 58.54Helped
use only the top-1 LLM as positive and the remaining LLMs as negative (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%)Hurt
add the sample-sample contrastive loss (ablation)ZOOTER · In-distribution tasks (Avg)accuracy (%): +1.52%Helped
add the sample-sample contrastive loss (ablation)ZOOTER · Out-of-distribution tasks (Avg)accuracy (%): +0.81%Helped
add candidate LLMs to the routing pool (ablation)RouterDC · In-distribution tasks (Avg)accuracy (%): 44.22 -> 58.54Helped

Surprising findings

Limitations

Experimental setup

Datasets: MMLU GSM8K CMMLU ARC-C HumanEval PreAlgebra MBPP C-EVAL JavaScript RouterBench

Benchmarks: MMLU GSM8K CMMLU ARC-C HumanEval PreAlgebra MBPP C-EVAL

Metrics: accuracy average accuracy inference time

Baselines: Voting ZOOTER LoraRetriever CosineClassifier Mistral-7B dolphin-2.9-llama3-8b

Builds on: ZOOTER LoraRetriever mDeBERTaV3-base t-SNE k-means

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy