SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.08292 · ICML · 2025

From Debate to Equilibrium: Belief-Driven Multi-Agent LLM Reasoning via Bayesian Nash Equilibrium

Bo Han, Tongliang Liu, Yi Xie, Zhanke Zhou, Chentao Cao, Qiyu Niu

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2506.08292.json · badge: /api/ran/2506.08292.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
tmlr-group/econ canonical (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
FunctionStatusWhere it lives
BeliefPolicyNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
tmlr-group/econ/src/modules/agents/belief_policy_network.py
code served (permissive licence) · get_code("b848a56c81c5733e")
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 an instance of its own class, BeliefPolicyNetwork: the run constructed the object and did not call it, so no result was computed. 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
import math

torch.manual_seed(0)

ARGS = {
    "observation_dim": 8,
    "belief_dim": 4,
    "hidden_dim": 16,
    "n_heads": 2,
    "n_layers": 1,
    "dropout": 0.1,
    "T_min": 0.1,
    "T_max": 2.0,
    "p_min": 0.1,
    "p_max": 0.9,
    "vocab_size": 100,
    "device": torch.device('cpu'),
    "memory_dim": 16,
}
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 BeliefPolicyNetwork — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BeliefPolicyNetwork 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
PositionalEncoding Ran
ran on a synthesized input · constructed an object; no result was computed
tmlr-group/econ/src/modules/agents/belief_policy_network.py
code served (permissive licence) · get_code("92c5b4b1b28a5565")
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 an instance of its own class, PositionalEncoding: the run constructed the object and did not call it, so no result was computed. 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 math
import torch
import torch.nn as nn

torch.manual_seed(0)

# The PositionalEncoding class takes the following parameters in __init__:
# - d_model: int - dimension of the model
# - dropout: float - dropout rate (default 0.1)
# - max_len: int - maximum sequence length (default 5000)

# The forward method expects x to be a tensor with shape (batch_size, seq_len, d_model)
# It adds positional encodings to x and applies dropout

ARGS = {
    'd_model': 4,
    'dropout': 0.1,
    'max_len': 5000
}
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 PositionalEncoding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PositionalEncoding 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
TransformerBlock Ran
ran on a synthesized input
tmlr-group/econ/src/modules/agents/belief_policy_network.py
code served (permissive licence) · get_code("c9580d1c98d9c426")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
from typing import Dict, Optional

class TransformerBlock(nn.Module):
    """Transformer块(复用)"""

    def __init__(self, embed_dim: int, num_heads: int, ff_dim: int, dropout: float=0.1):
        super().__init__()
        self.attn = nn.MultiheadAttention(embed_dim, num_heads, dropout=dropout, batch_first=True)
        self.norm1 = nn.LayerNorm(embed_dim)
        self.ff = nn.Sequential(nn.Linear(embed_dim, ff_dim), nn.ReLU(), nn.Dropout(dropout), nn.Linear(ff_dim, embed_dim))
        self.norm2 = nn.LayerNorm(embed_dim)

    def forward(self, x: torch.Tensor, key_padding_mask: Optional[torch.Tensor]=None) -> torch.Tensor:
        attn_out, _ = self.attn(x, x, x, key_padding_mask=key_padding_mask)
        x = self.norm1(x + attn_out)
        ff_out = self.ff(x)
        x = self.norm2(x + ff_out)
        return x


INIT_ARGS = {
    "embed_dim": 4,
    "num_heads": 2,
    "ff_dim": 8,
    "dropout": 0.1,
}

ARGS = {
    "x": torch.randn(2, 3, 4),
    "key_padding_mask": None,
}

if __name__ == "__main__":
    block = TransformerBlock(**INIT_ARGS)
    output = block(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
run_testing Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tmlr-group/econ/scripts/run_p0_test.py
code served (permissive licence) · get_code("c294d76e40c17c98")
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) 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
import os
import tempfile
import json
from pathlib import Path

torch.manual_seed(0)

# Create temporary directories
temp_dir = tempfile.mkdtemp()
log_dir = temp_dir
model_dir = os.path.join(temp_dir, "models")
os.makedirs(model_dir, exist_ok=True)

# Create a minimal config file
config_content = """
n_agents: 3
belief_dim: 128
commitment_embedding_dim: 1024
memory_dim: 137
test_nepisode: 2

env_args:
  state_shape: 64
  obs_shape: 1024
  n_actions: 5

env_args_test: {}

bne:
  enabled: false
  refine_at_infer: false
  max_iterations_infer: 0
"""

config_file = os.path.join(temp_dir, "config.yaml")
with open(config_file, 'w') as f:
    f.write(config_content)

# Mock the required modules
import sys
from types import ModuleType

# Create mock modules
mock_controllers = ModuleType('controllers')
mock_controllers_basic_mac = ModuleType('controllers.basic_mac')
mock_runners = ModuleType('runners')
mock_runners_episode = ModuleType('runners.episode_runner')
mock_utils = ModuleType('utils')
mock_utils_logging = ModuleType('utils.logging')
mock_learners = ModuleType('learners')
mock_learners_q = ModuleType('learners.q_learner')

sys.modules['controllers'] = mock_controllers
sys.modules['controllers.basic_mac'] = mock_controllers_basic_mac
sys.modules['runners'] = mock_runners
sys.modules['runners.episode_runner'] = mock_runners_episode
sys.modules['utils'] = mock_utils
sys.modules['utils.logging'] = mock_utils_logging
sys.modules['learners'] = mock_learners
sys.modules['learners.q_learner'] = mock_learners_q

# Create mock classes
class MockLogger:
    def info(self, msg):
        pass
    def debug(self, msg):
        pass
    def warning(self, msg):
        pass

def get_logger():
    return MockLogger()

mock_utils_logging.get_logger = get_logger

class BasicMAC:
    def __init__(self, scheme, groups, args):
        self.scheme = scheme
        self.groups = groups
        self.args = args
    
    def load_models(self, path):
        pass

mock_controllers_basic_mac.BasicMAC = BasicMAC

class EpisodeRunner:
    def __init__(self, args, logger):
        self.args = args
        self.logger = logger
        self.last_trace = None
    
    def get_env_info(self):
        return {
            'state_shape': (64,),
            'obs_shape': (1024,),
            'n_actions': 5
        }
    
    def setup(self, scheme, groups, learner, mac):
        pass
    
    def run(self, test_mode=False):
        # Return a mock batch
        batch = {}
        return batch
    
    def get_last_trace(self):
        # Return alternating correct/incorrect traces
        if not hasattr(self, '_trace_counter'):
            self._trace_counter = 0
        self._trace_counter += 1
        
        trace = {
            'is_correct': self._trace_counter % 2 == 1,
            'commitment_metadata': {
                'parse_method': 'json' if self._trace_counter % 2 == 1 else 'regex'
            }
        }
        return trace
    
    def set_alpha_provider(self, provider):
        pass

mock_runners_episode.EpisodeRunner = EpisodeRunner

class ECONLearner:
    def __init__(self, mac, scheme, logger, args):
        self.mac = mac
        self.scheme = scheme
        self.logger = logger
        self.args = args
    
    def load_models(self, path):
        pass

mock_learners_q.ECONLearner = ECONLearner

# Define arguments
ARGS = {
    'config_file': config_file,
    'episodes': 2,
    'bne_rounds': 0,
    'log_dir': log_dir,
    'model_dir': model_dir,
    'tag': 'test_run'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
controllers, learners, runners, torch, utils, yaml — 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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 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 4 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 frameworks can substantially boost the reasoning power of large language models (LLMs), but they typically incur heavy computational costs and lack convergence guarantees. To overcome these challenges, we recast multi-LLM coordination as an incomplete-information game and seek a Bayesian Nash equilibrium (BNE), in which each agent optimally responds to its probabilistic beliefs about the strategies of others. We introduce Efficient Coordination via Nash Equilibrium (ECON), a hierarchical reinforcementlearning paradigm that marries distributed reasoning with centralized final output. Under ECON, each LLM independently selects responses that maximize its expected reward, conditioned on its beliefs about co-agents, without requiring costly inter-agent exchanges. We mathematically prove that ECON attains a markedly tighter regret bound than non-equilibrium multi-agent schemes. Empirically, ECON outperforms existing multi-LLM approaches by 11.2% on average across six benchmarks spanning complex reasoning and planning tasks. Further experiments demonstrate ECON's ability to flexibly incorporate additional models, confirming its scalability and paving the way toward larger, more powerful multi-LLM ensembles. The code is publicly available at: https: //github.com/tmlr-group/ECON.

For agents

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

get_harvested_code_for_paper("2506.08292")
get_code_for_paper("2506.08292")
have("2506.08292")

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

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

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

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

Connect an agent — have() is free.