arXiv:2502.04510cs.CL2025-02NeurIPS被引 24

让多个大模型分工协作,自动优化角色与权重,提升整体表现。

Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM Systems

  • 将多大模型系统建模为有向无环图,通过粒子群优化确定最佳协作流程。
  • 在12个任务上平均比15种基线方法高18.5%的性能表现。
  • 适合需要多模型协同的复杂任务场景,尤其看重模型多样性价值。

我们提出Heterogeneous Swarms,一种通过联合优化模型角色与权重来设计多大模型系统的方法。将多大模型系统表示为具有拓扑消息传递的有向无环图(DAG),以实现协作生成。给定一组大模型专家和一个效用函数,该算法包含两个迭代步骤:角色步与权重步。角色步中,将模型角色视为学习一个指定输入输出流的DAG;从随机连续邻接矩阵出发,解码为离散DAG,按拓扑顺序调用大模型,基于效用函数(如任务准确率)评估,并使用粒子群优化调整邻接矩阵。权重步中,提出JFK-score量化每个大模型在最优发现的DAG中的贡献,并基于此分数使用粒子群优化调整模型权重。实验表明,Heterogeneous Swarms在12个任务上平均超越15种角色和/或权重基线方法18.5%。进一步分析显示,该方法发现了具有异质角色和显著协作增益的多大模型系统,且受益于语言模型的多样性。

原文摘要 · Abstract (English)

We propose Heterogeneous Swarms, an algorithm to design multi-LLM systems by jointly optimizing model roles and weights. We represent multi-LLM systems as directed acyclic graphs (DAGs) of LLMs with topological message passing for collaborative generation. Given a pool of LLM experts and a utility function, Heterogeneous Swarms employs two iterative steps: role-step and weight-step. For role-step, we interpret model roles as learning a DAG that specifies the flow of inputs and outputs between LLMs. Starting from a swarm of random continuous adjacency matrices, we decode them into discrete DAGs, call the LLMs in topological order, evaluate on the utility function (e.g. accuracy on a task), and optimize the adjacency matrices with particle swarm optimization based on the utility score. For weight-step, we assess the contribution of individual LLMs in the multi-LLM systems and optimize model weights with swarm intelligence. We propose JFK-score to quantify the individual contribution of each LLM in the best-found DAG of the role-step, then optimize model weights with particle swarm optimization based on the JFK-score. Experiments demonstrate that Heterogeneous Swarms outperforms 15 role- and/or weight-based baselines by 18.5% on average across 12 tasks. Further analysis reveals that Heterogeneous Swarms discovers multi-LLM systems with heterogeneous model roles and substantial collaborative gains, and benefits from the diversity of language models.

多模型协同优化算法大模型系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。