SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.20621 · 2026

PEAR: Permutation-Equivariant Adaptive Routing Multi-Agent Debate

Fengxiang He, Xia Hu, Ziwei Xu, Yang Feng

arXiv · PDF

Code that ran

6 of 7 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2606.20621.json · badge: /api/ran/2606.20621.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
EVIEHub/PEAR community
Papers with Code archive
6 ran · 1 no recorded run
FunctionStatusWhere it lives
_answer_at Ran
ran; our contract draft was wrong, not the code
EVIEHub/PEAR/core/topology.py
code served (permissive licence) · get_code("69948289646b484b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Mapping, Sequence

torch.manual_seed(0)

# Test with a Mapping (dict) case
answers_mapping = {1: "answer_one", 2: "answer_two", 3: "answer_three"}
agent_id_1 = 1

# Test with a Sequence case
answers_sequence = ["first", "second", "third"]
agent_id_2 = 2

# We'll create ARGS for the first case (Mapping)
ARGS = {
    "answers": answers_mapping,
    "agent_id": agent_id_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_value_at Ran
ran, honoured the contract we drafted
EVIEHub/PEAR/core/topology.py
code served (permissive licence) · get_code("5db8671f334aa99c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Mapping, Sequence

torch.manual_seed(0)

# Test case 1: Mapping with agent_id as key
values_mapping = {1: 0.5, 2: 0.7, 3: 0.9}
agent_id_1 = 2

ARGS = {
    "values": values_mapping,
    "agent_id": agent_id_1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_perm_to_topology Ran
ran; our contract draft was wrong, not the code
EVIEHub/PEAR/core/topology.py
code served (permissive licence) · get_code("6be0545e5bd6fefb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct arguments for apply_perm_to_topology
# The function expects:
# 1. base_role_topo: Adjacency (List[List[int]]) - role-space adjacency
# 2. perm_roles_to_agents: Sequence[int] - permutation mapping roles to agents

# Create a simple role-space adjacency for 4 roles
# Each role can see certain other roles
base_role_topo = [
    [1, 2],      # role 1 sees roles 1 and 2
    [2, 3],      # role 2 sees roles 2 and 3
    [1, 3, 4],   # role 3 sees roles 1, 3, and 4
    [4]          # role 4 sees role 4
]

# Create a permutation: role 1 -> agent 2, role 2 -> agent 1, role 3 -> agent 3, role 4 -> agent 4
# This means agents [2, 1, 3, 4] where index i corresponds to role (i+1)
perm_roles_to_agents = [2, 1, 3, 4]

ARGS = {
    "base_role_topo": base_role_topo,
    "perm_roles_to_agents": perm_roles_to_agents
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
edge_list Ran
ran, honoured the contract we drafted
EVIEHub/PEAR/core/topology.py
code served (permissive licence) · get_code("67c6cabace66ca14")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# The function expects `topo` which is an Adjacency (List[List[int]])
# It iterates over topo with enumerate(start=1), treating each element as a list of incoming neighbors
# For each target and its incoming list, it iterates over source indices and appends (source, target) tuples

# Create a small valid adjacency list
# Example: node 1 has no incoming edges, node 2 has incoming from 1, node 3 has incoming from 1 and 2
topo = [
    [],           # target 1: no incoming neighbors
    [1],          # target 2: incoming from source 1
    [1, 2],       # target 3: incoming from sources 1 and 2
]

ARGS = {
    "topo": topo
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score_state_permutation Ran
ran; our contract draft was wrong, not the code
EVIEHub/PEAR/core/topology.py
code served (permissive licence) · get_code("bb47b01a2c593bcf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Mapping, Sequence

torch.manual_seed(0)

# Build minimal valid arguments for score_state_permutation

# base_role_topo: an Adjacency (List[List[int]])
# This represents a role-space adjacency where each element is a list of incoming neighbors
base_role_topo = [
    [2],      # role 1 receives from role 2
    [1, 3],   # role 2 receives from roles 1, 3
    [2],      # role 3 receives from role 2
]

# perm_roles_to_agents: a permutation mapping roles to agents
# For 3 roles, we need a permutation of [1, 2, 3]
perm_roles_to_agents = [2, 1, 3]  # role 1->agent 2, role 2->agent 1, role 3->agent 3

# answers: can be Mapping[int, str] or Sequence[str]
# Using a mapping keyed by agent_id (1-indexed)
answers = {
    1: "answer_A",
    2: "answer_B",
    3: "answer_A",
}

# confidences: can be Mapping[int, float] or Sequence[float]
# Using a mapping keyed by agent_id (1-indexed)
confidences = {
    1: 4.5,
    2: 2.5,
    3: 5.0,
}

# influence: can be Mapping[int, float] or Sequence[float]
# Using a mapping keyed by agent_id (1-indexed)
influence = {
    1: 0.8,
    2: 0.5,
    3: 0.9,
}

# Optional hyperparameters with sensible defaults
alpha_targeted_cross = 1.0
alpha_influence = 0.5
alpha_low_confidence = 0.3
low_confidence_threshold = 3.0
targeted_cross_source_confidence_min = 4.0
targeted_cross_target_confidence_max = 3.0
normalize_terms = True

ARGS = {
    "base_role_topo": base_role_topo,
    "perm_roles_to_agents": perm_roles_to_agents,
    "answers": answers,
    "confidences": confidences,
    "influence": influence,
    "alpha_targeted_cross": alpha_targeted_cross,
    "alpha_influence": alpha_influence,
    "alpha_low_confidence": alpha_low_confidence,
    "low_confidence_threshold": low_confidence_threshold,
    "targeted_cross_source_confidence_min": targeted_cross_source_confidence_min,
    "targeted_cross_target_confidence_max": targeted_cross_target_confidence_max,
    "normalize_terms": normalize_terms,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
uniform_permutation Ran
ran, honoured the contract we drafted
EVIEHub/PEAR/core/topology.py
code served (permissive licence) · get_code("c47a1bccd927e78b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

def uniform_permutation(n: int, rng: random.Random) -> list[int]:
    """Draw a uniform permutation of ``[1..n]`` using ``rng``."""
    perm = list(range(1, n + 1))
    rng.shuffle(perm)
    return perm

# Set up arguments
n = 5
rng = random.Random(42)

ARGS = {
    "n": n,
    "rng": rng,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
state_aware_permutation Not yet run
unverified (harvested, no recorded run)
EVIEHub/PEAR/core/topology.py
code served (permissive licence) · get_code("e3ef9f556746d8a8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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-24.

Repositories linked to this paper

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

Abstract

Multi-agent debate improves the reliability of large language models (LLMs) through iterative peer critiques. However, fixed topologies often introduce persistent positional biases, amplify unreliable agents, and cause high sensitivity to role assignments. We introduce Permutation-Equivariant Adaptive Routing Multi-Agent Debate (PEAR), an inferencetime protocol that dynamically reconfigures communication roles and sparse topologies across consecutive debate rounds. By strategically switching agent-to-role assignments based on evolving agent states, PEAR prevents any agent from permanently occupying a privileged network position or distributes influence more evenly across the debate. We theoretically characterize PEAR as an equivariant sparse router: it preserves accuracy under agent relabeling while reducing routing complexity and improving generalization. Comprehensive empirical evaluations across four reasoning benchmarks and six diverse LLM backbones demonstrate PEAR significantly improves average accuracy over the strongest debate baselines. The code is at https://github.com/ EVIEHub/PEAR.

For agents

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

get_harvested_code_for_paper("2606.20621")
get_code_for_paper("2606.20621")
have("2606.20621")

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

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

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

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

Connect an agent — have() is free.