Lune

NeurIPS2024Top-tier venue

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

Shuhao Chen, Weisen Jiang, Baijiong Lin, James T. Kwok, Yu Zhang

Abstract

Recent works show that assembling multiple off-the-shelf large language models (LLMs) can harness their complementary abilities. To achieve this, routing is a promising method, which learns a router to select the most suitable LLM for each query. However, existing routing models are ineffective when multiple LLMs perform well for a query. To address this problem, in this paper, we propose a method called query-based Router by Dual Contrastive learning (RouterDC). The RouterDC model, which consists of an encoder and LLM embeddings, is trained by two proposed contrastive losses (sample-LLM and sample-sample losses). Experimental results show that RouterDC is effective in assembling LLMs and largely outperforms individual top-performing LLMs as well as existing routing methods on both in-distribution (+2.76%) and out-of-distribution (+1.90%) tasks. The source code is available at https://github.com/shuhao02/RouterDC.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

44 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Router-R1: Teaching LLMs Multi-Round Routing and Aggregation via Reinforcement Learning cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • ReMA: Learning to Meta-Think for LLMs with Multi-agent Reinforcement Learning cites MasRouter: Learning to Route LLMs for Multi-Agent Systems
  • ReMA: Learning to Meta-Think for LLMs with Multi-agent Reinforcement Learning cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Learning to Orchestrate Agents in Natural Language with the Conductor cites Measuring Massive Multitask Language Understanding
  • Universal Model Routing for Efficient LLM Inference cites Measuring Massive Multitask Language Understanding
  • Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers44

  1. Universal Model Routing for Efficient LLM InferenceWittawat Jitkrittum, Harikrishna Narasimhan, Ankit Singh Rawat, Jeevesh Juneja et al.ICLR 2026 · 99 citations
  2. Router-R1: Teaching LLMs Multi-Round Routing and Aggregation via Reinforcement LearningHaozhen Zhang, Tao Feng, Jiaxuan YouNeurIPS 2025 · 81 citations
  3. ReMA: Learning to Meta-Think for LLMs with Multi-agent Reinforcement LearningZiyu Wan, Yunxiang Li, Xiaoyu Wen, Yan Song et al.NeurIPS 2025 · 76 citations
  4. MasRouter: Learning to Route LLMs for Multi-Agent SystemsYanwei Yue, Guibin Zhang, Boyang Liu, Guancheng Wan et al.ACL 2025 · 45 citations
  5. Learning to Orchestrate Agents in Natural Language with the ConductorStefan Nielsen, Edoardo Cetin, Peter Schwendeman, Qi Sun et al.ICLR 2026 · 22 citations

Builds on27

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  3. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  4. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
  5. Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations

Related papers

  1. RAGRouter: Learning to Route Queries to Multiple Retrieval-Augmented Language ModelsJiarui Zhang, Xiangyu Liu, Yong Hu, Chaoyue Niu et al.NeurIPS 2025 · 12 citations
  2. RadialRouter: Structured Representation for Efficient and Robust Large Language Models RoutingRuihan Jin, Pengpeng Shao, Zhengqi Wen, Jinyang Wu et al.EMNLP Findings 2025 · 1 citation
  3. ICL-Router: In-Context Learned Model Representations for LLM RoutingChenxu Wang, Hao Li, Yiqun Zhang, Linyao Chen et al.AAAI 2026 · 11 citations
  4. RouterHGC: Optimized Router for LLM-based Multi-Agent Systems via Heterogeneous Graph Contrastive LearningYitao Xiao, Shaoyong Guo, Guoming Yang, Qingnan Wang et al.ACL Findings 2026
  5. LLMRouterBench: A Massive Benchmark and Unified Framework for LLM RoutingHao Li, Yiqun Zhang, Zhaoyan Guo, Chenxu Wang et al.ACL Findings 2026
Dusk over the sea between two cliffs drawn in fine vertical lines