Proceedings

Efficient Dynamic Ensembling for Multiple LLM Experts

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 8095-8103.

https://doi.org/10.24963/ijcai.2025/900

Abstract

LLMs have demonstrated impressive performance across various language tasks. However, the strengths of LLMs can vary due to different architectures, model sizes, areas of training data, etc. Therefore, ensemble reasoning for the strengths of different LLM experts is critical to achieving consistent and satisfactory performance on diverse inputs across a wide range of tasks. However, existing LLM ensemble methods are either computationally intensive or incapable of leveraging complementary knowledge among LLM experts for various inputs. In this paper, we propose an efficient Dynamic Ensemble Reasoning paradigm, called DER to integrate the strengths of multiple LLM experts conditioned on dynamic inputs. Specifically, we model the LLM ensemble reasoning problem as a Markov Decision Process, wherein an agent sequentially takes inputs to request knowledge from an LLM candidate and passes the output to a subsequent LLM candidate. Moreover, we devise a reward function to train a DER-Agent to dynamically select an optimal answering route given the input questions, aiming to achieve the highest performance with as few computational resources as possible. Last, to fully transfer the expert knowledge from the prior LLMs, we develop a Knowledge Transfer Prompt that enables the subsequent LLM candidates to transfer complementary knowledge effectively. Experiments demonstrate that our method uses fewer computational resources to achieve better performance compared to state-of-the-art baselines. Code and appendix are available at https://github.com/Fhujinwu/DER.

  1. [Achiam et al., 2023] Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Alt- man, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
  2. [Chen et al., 2024] Justin Chih-Yao Chen, Swarnadeep Saha, and Mohit Bansal. Reconcile: Round-table con- ference improves reasoning via consensus among diverse llms. The 62st Annual Meeting Of The Association For Computational Linguistics, 2024.
  3. [Chiang et al., 2023] Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E Gonzalez, et al. Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality. See https://vicuna. lmsys. org (accessed 14 April 2023), 2023. Link
  4. [Chung et al., 2024] Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. Jour- nal of Machine Learning Research, 25(70):1-53, 2024.
  5. [Cobbe et al., 2021] Karl Cobbe, Vineet Kosaraju, Moham- mad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word prob- lems. arXiv preprint arXiv:2110.14168, 2021.
  6. [Conover et al., 2023] Mike Conover, Matt Hayes, Ankit Mathur, Xiangrui Meng, Jianwei Xie, Jun Wan, Sam Shah, Ali Ghodsi, Patrick Wendell, Matei Zaharia, et al. Free dolly: Introducing the world's first truly open instruction- tuned llm, 2023.
  7. [Dong et al., 2024] Yihong Dong, Xue Jiang, Zhi Jin, and Ge Li. Self-collaboration code generation via chatgpt. ACM Transactions on Software Engineering and Method- ology, 33(7):1-38, 2024.
  8. [Du et al., 2022] Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. Glm: Gen- eral language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, pages 320- 335, 2022.
  9. [Du et al., 2023] Yilun Du, Shuang Li, Antonio Torralba, Joshua B Tenenbaum, and Igor Mordatch. Improving fac- tuality and reasoning in language models through multi- agent debate. In Forty-first International Conference on Machine Learning, 2023.
  10. [Geng et al., 2023] Xinyang Geng, Arnav Gudibande, Hao Liu, Eric Wallace, Pieter Abbeel, Sergey Levine, and Dawn Song. Koala: A dialogue model for academic re- search. Blog Post, April 2023.
  11. [Hu et al., 2025] Jinwu Hu, Wei Zhang, Yufeng Wang, Yu Hu, Bin Xiao, Mingkui Tan, and Qing Du. Dynamic compressing prompts for efficient inference of large lan- guage models. arXiv preprint arXiv:2504.11004, 2025.
  12. [Jiang et al., 2023] Dongfu Jiang, Xiang Ren, and Bill Yuchen Lin. Llm-blender: Ensembling large language models with pairwise comparison and generative fusion. Proceedings of the 61th Annual Meeting of the As- sociation for Computational Linguistics, 1:14165-14178, 2023.
  13. [Jiang et al., 2024] Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. Mixtral of ex- perts. arXiv preprint arXiv:2401.04088, 2024.
  14. [junyou li et al., 2024] junyou li, Qin Zhang, Yangbin Yu, QIANG FU, and Deheng Ye. More agents is all you need. Transactions on Machine Learning Research, 2024.
  15. [Kong et al., 2024] Aobo Kong, Shiwan Zhao, Hao Chen, Qicheng Li, Yong Qin, Ruiqi Sun, Xin Zhou, Enzhi Wang, and Xiaohang Dong. Better zero-shot reasoning with role- play prompting. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technolo- gies (Volume 1: Long Papers), pages 4099-4113, 2024.
  16. [LAION-AI, 2023] LAION-AI. Open assistant. 2023.
  17. [Liu et al., 2024] Zijun Liu, Yanzhe Zhang, Peng Li, Yang Liu, and Diyi Yang. Dynamic llm-agent network: An llm- agent collaboration framework with agent team optimiza- tion. Conference On Language Modeling, 2024.
  18. [Lu et al., 2024] Keming Lu, Hongyi Yuan, Runji Lin, Jun- yang Lin, Zheng Yuan, Chang Zhou, and Jingren Zhou. Routing to the expert: Efficient reward-guided ensemble of large language models. In Proceedings of the 2024 Conference of the North American Chapter of the Asso- ciation for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 1964-1974, 2024.
  19. [Matena and Raffel, 2022] Michael S Matena and Colin A Raffel. Merging models with fisher-weighted averag- ing. Advances in Neural Information Processing Systems, 35:17703-17716, 2022.
  20. [Mu et al., 2023] Yao Mu, Qinglong Zhang, Mengkang Hu, Wenhai Wang, Mingyu Ding, Jun Jin, Bin Wang, Jifeng Dai, Yu Qiao, and Ping Luo. Embodiedgpt: Vision- language pre-training via embodied chain of thought. Advances in Neural Information Processing Systems, 36:25081-25094, 2023.
  21. [Schulman et al., 2017] John Schulman, Filip Wolski, Pra- fulla Dhariwal, Alec Radford, and Oleg Klimov. Prox- imal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
  22. [Sheng et al., 2023] Ying Sheng, Lianmin Zheng, Binhang Yuan, Zhuohan Li, Max Ryabinin, Beidi Chen, Percy Liang, Christopher Ré, Ion Stoica, and Ce Zhang. Flex- gen: High-throughput generative inference of large lan- guage models with a single gpu. In International Confer- ence on Machine Learning, pages 31094-31116. PMLR, 2023.
  23. [Stability-AI, 2023] Stability-AI. Stablelm: Stability ai lan- guage models. 2023.
  24. [Stark et al., 2024] Carson Stark, Bohkyung Chun, Casey Charleston, Varsha Ravi, Luis Pabon, Surya Sunkari, Tarun Mohan, Peter Stone, and Justin Hart. Dobby: a conversational service robot driven by gpt-4. In 2024 33rd IEEE International Conference on Robot and Human Interactive Communication (ROMAN), pages 1362-1369. IEEE, 2024.
  25. [Sun et al., 2023] Tianxiang Sun, Xiaotian Zhang, Zhengfu He, Peng Li, Qinyuan Cheng, Hang Yan, Xiangyang Liu, Yunfan Shao, Qiong Tang, Xingjian Zhao, et al. Moss: Training conversational language models from synthetic data. arXiv preprint arXiv:2307.15020, 7(3), 2023.
  26. [Tang et al., 2024] Anke Tang, Li Shen, Yong Luo, Nan Yin, Lefei Zhang, and Dacheng Tao. Merging multi-task mod- els via weight-ensembling mixture of experts. In Inter- national Conference on Machine Learning, pages 47778- 47799. PMLR, 2024.
  27. [Taori et al., 2023] Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B Hashimoto. Stanford alpaca: An instruction-following llama model, 2023. [Team and others, 2023] MosaicML NLP Team et al. Intro- ducing mpt-7b: A new standard for open-source, ly usable llms, 2023.
  28. [Touvron et al., 2023] Hugo Touvron, Thibaut Lavril, Gau- tier Izacard, Xavier Martinet, Marie-Anne Lachaux, Tim- othée Lacroix, Baptiste Rozière, Naman Goyal, Eric Ham- bro, Faisal Azhar, et al. Llama: Open and efficient founda- tion language models. arXiv preprint arXiv:2302.13971, 2023.
  29. [Van Otterlo and Wiering, 2012] Martijn Van Otterlo and Marco Wiering. Reinforcement learning and markov deci- sion processes. In Reinforcement Learning: State-of-the- Art, pages 3-42. Springer, 2012.
  30. [Wan et al., 2024] Fanqi Wan, Xinting Huang, Deng Cai, Xi- aojun Quan, Wei Bi, and Shuming Shi. Knowledge fusion of large language models. International Conference on Learning Representations, 2024.
  31. [Wang et al., 2025] Qianyue Wang, Jinwu Hu, Zhengping Li, Yufeng Wang, Yu Hu, Mingkui Tan, et al. Generat- ing long-form story using dynamic hierarchical outlining with memory-enhancement. Proceedings of the 2024 Con- ference of the North American Chapter of the Association for Computational Linguistics, 2025.
  32. [Xu et al., 2023] Canwen Xu, Daya Guo, Nan Duan, and Ju- lian McAuley. Baize: An open-source chat model with parameter-efficient tuning on self-chat data. In Proceed- ings of the 2023 Conference on Empirical Methods in Nat- ural Language Processing, pages 6268-6278, 2023.
  33. [Yao et al., 2023] Jie Yao, Zihao Zhou, and Qiufeng Wang. Solving math word problem with problem type classifica- tion. In CCF International Conference on Natural Lan- guage Processing and Chinese Computing, pages 123- 134. Springer, 2023.
  34. [Yu et al., 2024] Le Yu, Bowen Yu, Haiyang Yu, Fei Huang, and Yongbin Li. Language models are super mario: Ab- sorbing abilities from homologous models as a free lunch. In Forty-first International Conference on Machine Learn- ing, 2024.
  35. [Zhang et al., 2019] Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675, 2019.
  36. [Zhang et al., 2022] Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068, 2022.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards