SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.11334 · ICML · 2024

Agent-Specific Effects: A Causal Effect Propagation Analysis in Multi-Agent MDPs

Goran Radanovic, Debmalya Mandal, Stelios Triantafyllou, Aleksa Sukovic

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 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; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2310.11334.json · badge: /api/ran/2310.11334.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
stelios30/agent-specific-effects marked official in Papers with Code
Papers with Code archive
3 ran · 0 no recorded run
FunctionStatusWhere it lives
CausalActor Ran
ran on a synthesized input · constructed an object; no result was computed
stelios30/agent-specific-effects/ase/actors/causal.py
code served (permissive licence) · get_code("19266899b028dacb")
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, CausalActor: 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 numpy as np
from numpy.random import Generator
from typing import Dict, Any, List

class Order:
    """Implements a total order of a list of items."""

    def __init__(self, order: List[int]) -> None:
        self.order = order
        self.ground_truth = list(range(len(order)))
        self.encode_items = {item: self.order.index(item) for item in self.ground_truth}
        self.encode_index = [self.order.index(item) for item in self.ground_truth]
        self.decode_index = [self.ground_truth.index(item) for item in self.order]

    def __str__(self) -> str:
        return ', '.join([str(item) for item in self.order])

    def compare(self, a: int, b: int):
        a_ind = self.encode_items[a]
        b_ind = self.encode_items[b]
        return -1 if a_ind < b_ind else 1 if a_ind > b_ind else 0

    def sort(self, items: List[int], return_index: bool=False) -> List[int]:
        if return_index:
            return self.decode_index
        return [items[self.encode_index[i]] for i in range(len(items))]


class NoiseModel:
    """Describes an environment noise model."""

    def __init__(self, order=None) -> None:
        self.order = order

    def sample(self, rng=None):
        """Samples a new noise model instance."""
        return NoiseModel(self.order)

    def sample_posterior(self, probs: List[float], realised: int, rng=None):
        """Samples a new noise model that corresponds to a realised action."""
        return NoiseModel(self.order)

    def choice(self, probs: List[float], rng=None) -> int:
        """Samples an index from the categorical distribution."""
        if rng is not None:
            return int(rng.choice(len(probs), p=probs))
        return int(np.random.choice(len(probs), p=np.array(probs) / np.sum(probs)))


class ConcreteCausalActor:
    """Concrete implementation of CausalActor for testing."""

    def __init__(self, id: int):
        self.id = id

    def policy(self, state: Dict[str, Any]) -> List[float]:
        """Returns a simple uniform policy over 3 actions."""
        return [0.33, 0.33, 0.34]

    def action(self, state: Dict[str, Any], act_noise: NoiseModel, return_probs: bool=False):
        """Selects action based on state and noise."""
        probs = self.policy(state)
        rng = np.random.default_rng()
        action_idx = act_noise.choice(probs, rng=rng)
        if return_probs:
            return action_idx, probs
        return action_idx

    def _get_obs(self, state: Dict[str, Any]) -> Dict[str, Any]:
        """Extracts agent-relevant information from state."""
        return {"agent_view": state.get("observation", {})}


# Create test state
test_state = {
    "observation": {"feature_1": 1.0, "feature_2": 2.0},
    "step": 0,
    "agents_count": 2
}

# Create noise model with an order
order = Order([2, 0, 1])
noise_model = NoiseModel(order=order)

# Construct ARGS
ARGS = {
    "id": 42
}
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 CausalActor — 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 CausalActor 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
NoiseModel Ran
ran on a synthesized input · constructed an object; no result was computed
stelios30/agent-specific-effects/ase/actors/causal.py
code served (permissive licence) · get_code("91145c8fc03e3711")
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, NoiseModel: 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 numpy as np
from numpy.random import Generator

class Order:
    """Implements a total order of a list of items."""

    def __init__(self, order):
        self.order = order
        self.ground_truth = list(range(len(order)))
        self.encode_items = {item: self.order.index(item) for item in self.ground_truth}
        self.encode_index = [self.order.index(item) for item in self.ground_truth]
        self.decode_index = [self.ground_truth.index(item) for item in self.order]

    def __str__(self):
        return ', '.join([str(item) for item in self.order])

    def compare(self, a, b):
        a_ind = self.encode_items[a]
        b_ind = self.encode_items[b]
        return -1 if a_ind < b_ind else 1 if a_ind > b_ind else 0

    def sort(self, items, return_index=False):
        if return_index:
            return self.decode_index
        return [items[self.encode_index[i]] for i in range(len(items))]


class NoiseModel:
    """Describes an environment noise model."""

    def __init__(self, order=None):
        self.order = order

    def sample(self, rng=None):
        """Samples a new noise model instance."""
        raise NotImplementedError()

    def sample_posterior(self, probs, realised, rng=None):
        """Samples a new noise model that corresponds to a realised action."""
        raise NotImplementedError()

    def choice(self, probs, rng=None):
        """Samples an index of element from the passed categorical distribution `probs`."""
        raise NotImplementedError()


# Create test instances
order_instance = Order([0, 1, 2, 3])
rng_instance = np.random.default_rng(seed=42)

ARGS = {
    "order": order_instance
}
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 NoiseModel — 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 NoiseModel 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
Order Ran
ran on a synthesized input · constructed an object; no result was computed
stelios30/agent-specific-effects/ase/actors/causal.py
code served (permissive licence) · get_code("9fdd814392333c55")
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, Order: 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 numpy as np
from typing import List

torch.manual_seed(0)

# Construct the order argument
# order should be a permutation of indices from 0 to n-1
# Let's create a simple permutation: [2, 0, 3, 1]
order = [2, 0, 3, 1]

ARGS = {
    "order": order
}
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 Order — 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 Order 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

Also present in other papers' code

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

Establishing causal relationships between actions and outcomes is fundamental for accountable multi-agent decision-making. However, interpreting and quantifying agents' contributions to such relationships pose significant challenges. These challenges are particularly prominent in the context of multi-agent sequential decision-making, where the causal effect of an agent's action on the outcome depends on how other agents respond to that action. In this paper, our objective is to present a systematic approach for attributing the causal effects of agents' actions to the influence they exert on other agents. Focusing on multiagent Markov decision processes, we introduce agent-specific effects (ASE), a novel causal quantity that measures the effect of an agent's action on the outcome that propagates through other agents. We then turn to the counterfactual counterpart of ASE (cf-ASE), provide a sufficient set of conditions for identifying cf-ASE, and propose a practical sampling-based algorithm for estimating it. Finally, we experimentally evaluate the utility of cf-ASE through a simulation-based testbed, which includes a sepsis management environment.

For agents

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

get_harvested_code_for_paper("2310.11334")
get_code_for_paper("2310.11334")
have("2310.11334")

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

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

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

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

Connect an agent — have() is free.