SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.20640 · 2026

Hear Both Sides: Efficient Multi-Agent Debate via Diversity-Aware Message Retention

Hung Le, Svetha Venkatesh, Anh Nguyen, Dung Nguyen, Manh Nguyen

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 3 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/2603.20640.json · badge: /api/ran/2603.20640.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
DA2I2-SLM/DAR canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
build_normal_msg Ran
ran; our contract draft was wrong, not the code
DA2I2-SLM/DAR/src/dev.py
code served (permissive licence) · get_code("c638b2060503f8fd")
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
import numpy as np

# Examine function usage:
# - agent: used as a key to index into responses dict
# - peer_ids: iterable of ids, each used to index into responses dict
# - responses: dict mapping agent ids to strings
# - last_vote_ans: optional value (can be None or a string)

torch.manual_seed(0)

ARGS = {
    'agent': 'agent_0',
    'peer_ids': ['agent_1', 'agent_2'],
    'responses': {
        'agent_0': 'I think the answer is A.',
        'agent_1': 'I believe the answer is B.',
        'agent_2': 'My opinion is C.',
    },
    'last_vote_ans': 'B'
}
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 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
build_normal_msg_with_ids Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DA2I2-SLM/DAR/src/dev.py
code served (permissive licence) · get_code("ef1c573d03500e54")
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
import numpy as np

# Construct valid arguments for build_normal_msg_with_ids
agent = 0
peers = [1, 2, 3]
responses = {
    0: "I think the answer is option A because of reasoning X",
    1: "I believe option B is correct based on evidence Y",
    2: "My opinion is option A, similar to agent 0",
    3: "I think option C is the best choice"
}
last_vote_ans = "Option A (2 votes)"

ARGS = {
    "agent": agent,
    "peers": peers,
    "responses": responses,
    "last_vote_ans": last_vote_ans
}
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 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
engine_hf Ran
ran; our contract draft was wrong, not the code
DA2I2-SLM/DAR/src/model/model_utils.py
code served (permissive licence) · get_code("7b4d0821e8c46c22")
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. 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.eos_token_id = 2
    
    def apply_chat_template(self, msgs, tokenize=False, add_generation_prompt=True):
        # Simple mock: concatenate message contents
        return " ".join([m.get("content", "") for m in msgs])
    
    def __call__(self, texts, return_tensors=None, padding=False, truncation=False):
        # Return mock token ids and attention mask
        # Pad to length 5 for consistency
        batch_size = len(texts)
        max_len = 5
        input_ids = torch.randint(0, 100, (batch_size, max_len))
        attention_mask = torch.ones(batch_size, max_len, dtype=torch.long)
        return {
            'input_ids': input_ids,
            'attention_mask': attention_mask,
        }
    
    def decode(self, token_ids, skip_special_tokens=True):
        return f"generated response {token_ids[-1].item()}"

# Build a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = type('Config', (), {'name_or_path': 'gpt2'})()
        self.linear = nn.Linear(10, 1)
        self.device_type = 'cpu'
    
    @property
    def device(self):
        return torch.device('cpu')
    
    def generate(self, input_ids, attention_mask, pad_token_id, max_new_tokens, 
                 return_dict_in_generate, output_scores, do_sample, temperature, 
                 top_p, num_return_sequences, use_cache=None, return_legacy_cache=None):
        # Return mock generated sequences (append 3 tokens to input)
        batch_size = input_ids.shape[0]
        seq_len = input_ids.shape[1]
        generated = torch.cat([input_ids, torch.randint(0, 100, (batch_size, 3))], dim=1)
        return type('Output', (), {'sequences': generated})()
    
    def forward(self, input_ids, labels=None):
        # Simple mock forward pass
        batch_size = input_ids.shape[0]
        loss = torch.tensor(0.5)
        return type('Output', (), {'loss': loss})()

# Build a minimal agent
class MinimalAgent:
    def __init__(self):
        self.tokenizer = MinimalTokenizer()
        self.huggingface_model = MinimalModel()

# Build message inputs
messages = [
    [{"role": "user", "content": "Hello"}],
    [{"role": "user", "content": "World"}],
]

agent = MinimalAgent()

ARGS = {
    'messages': messages,
    'agent': agent,
    'num_agents': 1,
    'stop_sequences': None,
    'top_k_uncertainty': None,
    'uncertainty_metric': 'anll',
    'uncertainty_prompt': None,
    'hf_batch_size': 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 tuple — a tuple 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
evaluate_arithmetics Ran
ran; our contract draft was wrong, not the code
DA2I2-SLM/DAR/src/evaluator.py
code served (permissive licence) · get_code("a72d68a37728a783")
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. 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 argparse
import sys
import os
import copy
import time
import random
import json
import pickle
import re
import collections
import numpy as np

# Set random seed for reproducibility
random.seed(42)
np.random.seed(42)

# Define test data for the evaluate_arithmetics function
responses = {
    "response_1": "The calculation is {final answer: 42.7} and we got it.",
    "response_2": "Here is {final answer: 42.7} as the result.",
    "response_3": "The answer is {final answer: 42.7} confirmed.",
}

answer = 42.68

ARGS = {
    "responses": responses,
    "answer": answer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
evaluate_mcq Ran
ran; our contract draft was wrong, not the code
DA2I2-SLM/DAR/src/evaluator.py
code served (permissive licence) · get_code("073596ca49ad3ad6")
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. 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 argparse
import sys
import os
import copy
import time
import random
import json
import pickle
import re
import collections

random.seed(42)

ARGS = {
    'responses': {
        'response_1': 'The answer is {final answer: A}',
        'response_2': 'The answer is {final answer: A}',
        'response_3': 'The answer is {final answer: B}',
    },
    'answer': '(A)',
}
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 tuple — a tuple 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
gather_last_token Ran
ran; our contract draft was wrong, not the code
DA2I2-SLM/DAR/src/model/falcon.py
code served (permissive licence) · get_code("8dfbcae9b1f4de30")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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

torch.manual_seed(0)

# The function gather_last_token expects a 3D tensor
# It indexes with [batch_idx, -1, :] to get the last token for each batch item
# So we need shape: (batch_size, sequence_length, feature_dim)

tensor = torch.randn(2, 5, 4)  # batch_size=2, seq_len=5, feature_dim=4

ARGS = {
    "tensor": tensor
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
get_instruction_suffix Ran
ran; our contract draft was wrong, not the code
DA2I2-SLM/DAR/src/evaluator.py
code served (permissive licence) · get_code("ec5050de1f9e05c4")
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.

class Args:
    def __init__(self, data, bae=False, cot=False):
        self.data = data
        self.bae = bae
        self.cot = cot

ARGS = {
    'args': Args(data='arithmetics', bae=False, cot=False)
}
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 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
get_peers Ran
ran; our contract draft was wrong, not the code
DA2I2-SLM/DAR/src/dev.py
code served (permissive licence) · get_code("4d100dfac04c76f7")
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 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 torch.nn as nn

torch.manual_seed(0)

# Define a simple stand-in agent class
class Agent:
    def __init__(self, agent_id):
        self.id = agent_id
    
    def __repr__(self):
        return f"Agent({self.id})"

# Create a stand-in args class
class Args:
    def __init__(self, centralized=False, sparse=False):
        self.centralized = centralized
        self.sparse = sparse

# Build test data for different scenarios
agents = [Agent(0), Agent(1), Agent(2), Agent(3)]
i = 1
args = Args(centralized=False, sparse=False)

ARGS = {
    "i": i,
    "agents": agents,
    "args": args
}
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 1, dtype family float — 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
create_zero_shot_prompt Not yet run
unverified (harvested, no recorded run)
DA2I2-SLM/DAR/src/model/falcon.py
code served (permissive licence) · get_code("b7f8ce776f3eb615")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
DA2I2-SLM/DAR/src/model/falcon.py
code served (permissive licence) · get_code("83f5d8fd4615419d")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
DA2I2-SLM/DAR/src/model/llama.py
code served (permissive licence) · get_code("f8d90d67f4aad3ad")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

FunctionAlso present inEarliest-datedOthers named
create_zero_shot_prompt 1 other paper
1 dated earlier
2508.17536 (2025-08)
Debate or Vote: Which Yields Better Decisions in Multi-Agent Large Language Models?
evaluate_arithmetics 1 other paper
1 dated earlier
2508.17536 (2025-08)
Debate or Vote: Which Yields Better Decisions in Multi-Agent Large Language Models?
evaluate_mcq 1 other paper
1 dated earlier
2508.17536 (2025-08)
Debate or Vote: Which Yields Better Decisions in Multi-Agent Large Language Models?
gather_last_token 1 other paper
1 dated earlier
2508.17536 (2025-08)
Debate or Vote: Which Yields Better Decisions in Multi-Agent Large Language Models?
get_instruction_suffix 1 other paper
1 dated earlier
2508.17536 (2025-08)
Debate or Vote: Which Yields Better Decisions in Multi-Agent Large Language Models?

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

Multi-Agent Debate has emerged as a promising framework for improving the reasoning quality of large language models through iterative inter-agent communication. However, broadcasting all agent messages at every round introduces noise and redundancy that can degrade debate quality and waste computational resources. Current approaches rely on uncertainty estimation to filter low-confidence responses before broadcasting, but this approach is unreliable due to miscalibrated confidence scores and sensitivity to threshold selection. To address this, we propose Diversity-Aware Retention (DAR), a lightweight debate framework that, at each debate round, selects the subset of agent responses that maximally disagree with each other and with the majority vote before broadcasting. Through an explicit index-based retention mechanism, DAR preserves the original messages without modification, ensuring that retained disagreements remain authentic. Experiments on diverse reasoning and question answering benchmarks demonstrate that our selective message propagation consistently improves debate performance, particularly as the number of agents scales, where noise accumulation is most severe. Our results highlight that what agents hear is as important as what agents say in multi-agent reasoning systems. Code is publicly available at https://github.com/DA2I2-SLM/DAR.

For agents

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

get_harvested_code_for_paper("2603.20640")
get_code_for_paper("2603.20640")
have("2603.20640")

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

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

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

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

Connect an agent — have() is free.