SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.06859 · 2026

Exact Is Easier: Credit Assignment for Cooperative LLM Agents

Xiaoyu Shen, Wei Zhang, Wenjie Li, Yanjun Chen, Xinming Zhang, Hanlin Wang, Yirong Sun, Jinghan Wang

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 2 no recorded run), measured 2026-11-23; 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.06859.json · badge: /api/ran/2603.06859.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
EIT-EAST-Lab/C3 community
Papers with Code archive
8 ran · 2 no recorded run
FunctionStatusWhere it lives
_ensure_1d Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("5bdf3ef0a9492053")
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 Tensor, ndim 1, dtype family float, shape (2,) 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)

# Create a valid 1D tensor with batch size 2
x_valid = torch.randn(2)

# Create the ARGS dictionary with all required parameters
ARGS = {
    'x': x_valid,
    'name': 'test_tensor'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 1, dtype family float, shape (2,) — shape (2,) 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
_ensure_2d Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("7e703eb641227f84")
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 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)

# Create a valid 2D tensor with shape [B, T] where B=2 (batch), T=4 (time/sequence)
valid_2d_tensor = torch.randn(2, 4)

# Create the ARGS dictionary with all parameters
ARGS = {
    'x': valid_2d_tensor,
    'name': 'test_tensor'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
_group_stats Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("98edca63bea336b7")
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 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

torch.manual_seed(0)

# Create small test tensors
# x: flattened tensor of values
x = torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], dtype=torch.float32)

# group_ids: tensor mapping each element to a group
# Using values 0, 1, 2 to create 3 groups
group_ids = torch.tensor([0, 0, 1, 1, 2, 2], dtype=torch.long)

# eps: small epsilon value for numerical stability
eps = 1e-5

ARGS = {
    "x": x,
    "group_ids": group_ids,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
_inverse_and_counts Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("adcf884c9c0dd2c0")
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 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

torch.manual_seed(0)

# Create a small tensor of group IDs
# The function expects a tensor of group identifiers
group_ids = torch.tensor([0, 1, 0, 2, 1, 0], dtype=torch.long)

ARGS = {
    "group_ids": group_ids,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
compute_magrpo Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("ec00447c486162e0")
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 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

torch.manual_seed(0)

# Small tensors: batch=2, time=3
B, T = 2, 3

# action_mask: [B, T] boolean-like mask for valid action tokens
action_mask = torch.tensor([
    [1, 1, 0],
    [1, 1, 1]
], dtype=torch.float32)

# rewards: [B] scalar rewards (will be expanded to token-level)
rewards = torch.tensor([1.0, 2.0], dtype=torch.float32)

# values: optional, not used in compute_magrpo but required by signature
values = torch.tensor([
    [0.5, 0.3, 0.0],
    [0.4, 0.2, 0.1]
], dtype=torch.float32)

# group_ids: [B] group assignment for each sample
group_ids = torch.tensor([0, 1], dtype=torch.long)

ARGS = {
    'action_mask': action_mask,
    'rewards': rewards,
    'values': values,
    'group_ids': group_ids,
    'baseline': 'group_mean',
    'gamma': 1.0,
    'lambd': 1.0,
    'normalize_adv': True,
    'require_group_k': False,
    'token_normalize': False,
    'eps': 1e-08,
}
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, ndim 3, 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
expand_scalar_rewards_to_tokens Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("b99e3a8733a3581a")
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 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)

# Test case 1: rewards is 1D [B], action_mask is 2D [B, T]
B = 2
T = 4

# Create a 1D rewards tensor [B]
rewards = torch.tensor([1.0, 2.0])

# Create a 2D action_mask tensor [B, T] with some valid actions
action_mask = torch.tensor([
    [1.0, 1.0, 0.0, 0.0],
    [1.0, 1.0, 1.0, 0.0]
])

ARGS = {
    'rewards': rewards,
    'action_mask': action_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
gae_advantages Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("3c716ee0b421b0a0")
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 tuple, 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

torch.manual_seed(0)

# Batch size: 2, Sequence length: 4
B, T = 2, 4

# Create rewards tensor [B, T]
rewards = torch.randn(B, T)

# Create values tensor [B, T]
values = torch.randn(B, T)

# Create action_mask tensor [B, T] with binary values
action_mask = torch.ones(B, T)

# Set gamma and lambda parameters
gamma = 0.99
lambd = 0.95

ARGS = {
    'rewards': rewards,
    'values': values,
    'action_mask': action_mask,
    'gamma': gamma,
    'lambd': lambd,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
normalize_advantages Ran
ran; our contract draft was wrong, not the code
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("3ea1d3ff7a37ef07")
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 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)

# Create small 2D tensors for advantages and action_mask
# Batch size: 2, Time/Token dimension: 4
advantages = torch.randn(2, 4)
action_mask = torch.randint(0, 2, (2, 4)).float()

# Small epsilon value for numerical stability
eps = 1e-08

ARGS = {
    'advantages': advantages,
    'action_mask': action_mask,
    'eps': eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
_require_min_group_size Not yet run
unverified (harvested, no recorded run)
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("d3db27af00abbda9")
How it ran

no invocation recorded.

compute_c3 Not yet run
unverified (harvested, no recorded run)
EIT-EAST-Lab/C3/c3/algorithms/c3.py
code served (permissive licence) · get_code("17edfe07ec82d21e")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Removing an agent from a cooperative team to measure its contribution seems natural, yet in multi-agent LLM systems this evaluation distorts the result it claims to measure. This failure is not isolated: learned critics, trajectory-level baselines, and agent-removal counterfactuals all inherit from standard multi-agent reinforcement learning a premise that exact counterfactual evaluation requires privileged environment access, and therefore approximate. In cooperative LLM systems, this premise is false. Interaction histories are deterministic functions of observable text with no hidden state, so any decision point can be restored exactly, making direct causal measurement possible without parametric approximation. C3 exploits this property by fixing the complete history at each decision point, sampling alternative actions under a frozen behavior policy, and computing unbiased per-decision advantages through a parameter-free leave-one-out baseline. Across six benchmarks spanning math reasoning and code generation, two model families, and two multi-agent topologies, C3 consistently outperforms all baselines; a controlled decomposition confirms gains originate from credit quality, not architecture, while checkpoint restoration reduces training token consumption. The exact solution proves simpler, cheaper, and more effective than all approximate alternatives. The same structural property that enables exact credit also enables exact verification: three independently computable diagnostics, credit fidelity, withingroup variance, and inter-agent influence, constitute the first method-agnostic auditing tool for multi-agent LLM credit assignment. Our code is available at https://github.com/EIT-EAST-Lab/C3.

For agents

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

get_harvested_code_for_paper("2603.06859")
get_code_for_paper("2603.06859")
have("2603.06859")

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

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

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

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

Connect an agent — have() is free.