SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.04510 · NeurIPS · 2025

HETEROGENEOUS SWARMS: Jointly Optimizing Model Roles and Weights for Multi-LLM Systems

Chen-Yu Lee, Hamid Palangi, Luke Zettlemoyer, Tomas Pfister, Yulia Tsvetkov, Zifeng Wang, Shangbin Feng, Weijia Shi, Yike Wang, Palash Goyal, Huang Xia

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 4 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2502.04510.json · badge: /api/ran/2502.04510.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
BunsenFeng/heterogeneous_swarm community
Papers with Code archive
9 ran · 4 no recorded run
FunctionStatusWhere it lives
assign_gpu Ran
ran, honoured the contract we drafted
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("4efc4f340a8c12ee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

batch_generate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("2a9ac558452970b5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

batch_generate_chat_template Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("e39027f28fba78ae")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

graph_decode Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("c2840c3ed37c731c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

multiple_choice_answer_parsing Ran
ran; our contract draft was wrong, not the code
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("babad0e4877852b6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

multiple_choice_prompt Ran
ran; our contract draft was wrong, not the code
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("4ffba672bf62f870")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

softmax Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("380f691b7059126a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

top_p_sampling_selection Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("56b551b6ea8c8892")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

topological_sort Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("9e81861a2b61b612")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("c3251894d6a5c6ec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_gpu_memory_in_gb Not yet run
unverified (harvested, no recorded run)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("393290bc3ad879ee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

graph_generate Not yet run
unverified (harvested, no recorded run)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("fe99d09909adebc7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

node_evaluate Not yet run
unverified (harvested, no recorded run)
BunsenFeng/heterogeneous_swarm/search.py
pointer only (licence: NONE) · get_code("37e76befc6431d2f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, BunsenFeng/heterogeneous_swarm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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 HETEROGE-NEOUS SWARMS outperforms 17 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. 2 * Work done as a student researcher at Google Cloud AI Research. 2 Resources available at https://github.com/BunsenFeng/heterogeneous_swarm. 39th Conference on Neural Information Processing Systems (NeurIPS 2025).

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2502.04510")
get_code_for_paper("2502.04510")
have("2502.04510")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2502.04510.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2502.04510.svg)](https://syntology.ai/paper/2502.04510)

Connect an agent — have() is free.