SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.11071 · 2023

Neural Amortized Inference for Nested Multi-agent Reasoning

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; 1 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 4 failures of our instrument; 2 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/2308.11071.json · badge: /api/ran/2308.11071.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
KJha02/AmortizedNestedReasoning canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
KL Ran
ran, violated the contract we drafted
KJha02/AmortizedNestedReasoning/CARLO/accuracyViewer.py
code served (permissive licence) · get_code("b7f32e53dd138e62")
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 float64, ndim 0, 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 numpy as np
from scipy.special import rel_entr

# Create two simple 1D probability distributions
gt_distrib = np.array([0.2, 0.3, 0.5, 0.0])
approx_distrib = np.array([0.1, 0.4, 0.4, 0.1])

ARGS = {
    "gt_distrib": gt_distrib,
    "approx_distrib": approx_distrib,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
avg_KL Ran
ran, violated the contract we drafted
KJha02/AmortizedNestedReasoning/CARLO/accuracyViewer.py
code served (permissive licence) · get_code("d2bffbbb4b3517ad")
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 float64, ndim 0, 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 numpy as np

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

# Create sample 2D distributions (batch of distributions)
# Each row is a probability distribution that sums to 1
gt_distribs = np.array([
    [0.5, 0.3, 0.2, 0.0],
    [0.1, 0.6, 0.2, 0.1]
], dtype=np.float64)

approx_distribs = np.array([
    [0.4, 0.35, 0.25, 0.0],
    [0.15, 0.55, 0.25, 0.05]
], dtype=np.float64)

ARGS = {
    "gt_distribs": gt_distribs,
    "approx_distribs": approx_distribs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
color_rgb Ran
ran; our contract draft was wrong, not the code
KJha02/AmortizedNestedReasoning/CARLO/graphics.py
code served (permissive licence) · get_code("97486dfe3a8b8d21")
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

ARGS = {
    'r': 255,
    'g': 128,
    'b': 64
}
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
get_config_name Ran
ran; our contract draft was wrong, not the code
KJha02/AmortizedNestedReasoning/CARLO/car_utils/network.py
code served (permissive licence) · get_code("657bcb7c245e9d6f")
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

class Args:
    def __init__(self):
        self.sampled_actions = 10
        self.lookAheadDepth = 5
        self.beta = 0.9

args = Args()

ARGS = {'args': args}
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
get_corrected_log_weight Ran
ran; our contract draft was wrong, not the code
KJha02/AmortizedNestedReasoning/CARLO/reasoning_about_car_L0.py
code served (permissive licence) · get_code("7f3bd4d6b585ad79")
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 numpy as np

# Test case 1: log_weights with reasonable values (not too small)
log_weights_1 = np.array([0.5, 1.2, 0.8, -0.3])

# Test case 2: log_weights with very small values (triggering the warning)
log_weights_2 = np.array([-1000.0, -2000.0, -1500.0, -3000.0])

ARGS = {
    "log_weights": log_weights_1
}
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
numberCorrect Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KJha02/AmortizedNestedReasoning/CARLO/accuracyViewer.py
code served (permissive licence) · get_code("2644c2fd692a5c0e")
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
import numpy as np

torch.manual_seed(0)

# Create sample predictions: 2 samples, 4 classes
# Each row represents probability scores for each class
predictions = torch.tensor([
    [0.1, 0.9, 0.0, 0.0],
    [0.2, 0.2, 0.3, 0.3]
], dtype=torch.float32)

# Create target labels: which class is correct for each sample
target = torch.tensor([1, 2], dtype=torch.long)

ARGS = {
    "predictions": predictions,
    "target": target
}
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 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
onSegment Ran
ran, violated the contract we drafted
KJha02/AmortizedNestedReasoning/CARLO/geometry.py
code served (permissive licence) · get_code("46d082a51094b915")
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 bool, 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 numpy as np

class Point:
    def __init__(self, x: float, y: float):
        self.x = float(x)
        self.y = float(y)

    def __str__(self):
        return 'Point(' + str(self.x) + ', ' + str(self.y) + ')'

    def __add__(self, other: 'Point') -> 'Point':
        return Point(self.x + other.x, self.y + other.y)

    def __sub__(self, other: 'Point') -> 'Point':
        return Point(self.x - other.x, self.y - other.y)

    def norm(self, p: int=2) -> float:
        return (self.x ** p + self.y ** p) ** (1.0 / p)

    def dot(self, other: 'Point') -> float:
        return self.x * other.x + self.y * other.y

    def __mul__(self, other: float) -> 'Point':
        return Point(other * self.x, other * self.y)

    def __rmul__(self, other: float) -> 'Point':
        return self.__mul__(other)

    def __truediv__(self, other: float) -> 'Point':
        return self.__mul__(1.0 / other)

def onSegment(p: Point, q: Point, r: Point) -> bool:
    """Check if point q lies on segment pr"""
    if (q.x <= max(p.x, r.x) and q.x >= min(p.x, r.x) and
        q.y <= max(p.y, r.y) and q.y >= min(p.y, r.y)):
        return True
    return False

p = Point(0.0, 0.0)
q = Point(1.0, 1.0)
r = Point(2.0, 2.0)

ARGS = {
    'p': p,
    'q': q,
    'r': r
}
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 bool, 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
orientation Ran
ran, honoured the contract we drafted
KJha02/AmortizedNestedReasoning/CARLO/geometry.py
code served (permissive licence) · get_code("7b23f2ea2f888664")
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 int, ndim 0, dtype family int, 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 numpy as np

class Point:
    def __init__(self, x: float, y: float):
        self.x = float(x)
        self.y = float(y)

    def __str__(self):
        return 'Point(' + str(self.x) + ', ' + str(self.y) + ')'

    def __add__(self, other: 'Point') -> 'Point':
        return Point(self.x + other.x, self.y + other.y)

    def __sub__(self, other: 'Point') -> 'Point':
        return Point(self.x - other.x, self.y - other.y)

    def norm(self, p: int=2) -> float:
        return (self.x ** p + self.y ** p) ** (1.0 / p)

    def dot(self, other: 'Point') -> float:
        return self.x * other.x + self.y * other.y

    def __mul__(self, other: float) -> 'Point':
        return Point(other * self.x, other * self.y)

    def __rmul__(self, other: float) -> 'Point':
        return self.__mul__(other)

    def __truediv__(self, other: float) -> 'Point':
        return self.__mul__(1.0 / other)

def orientation(p: Point, q: Point, r: Point) -> int:
    """
    Find orientation of ordered triplet (p, q, r).
    Returns:
    0 --> p, q and r are colinear
    1 --> Clockwise
    2 --> Counterclockwise
    """
    val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y)
    if np.abs(val) < 1e-10:
        return 0
    return 1 if val > 0 else 2

p_1 = Point(0.0, 0.0)
q_1 = Point(1.0, 1.0)
r_1 = Point(2.0, 2.0)

ARGS = {
    'p': p_1,
    'q': q_1,
    'r': r_1
}
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 int, ndim 0, dtype family int, 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
expand_batch Not yet run
unverified (harvested, no recorded run)
KJha02/AmortizedNestedReasoning/CARLO/car_utils/network.py
code served (permissive licence) · get_code("c4601ed1507b2962")
How it ran

no invocation recorded.

expand_vec Not yet run
unverified (harvested, no recorded run)
KJha02/AmortizedNestedReasoning/CARLO/car_utils/network.py
code served (permissive licence) · get_code("b270670148e673b6")
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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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
color_rgb 1 other paper
1 dated earlier
1906.02771 (2019-06)
Improving Exploration in Soft-Actor-Critic with Normalizing Flows Policies

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

Multi-agent interactions, such as communication, teaching, and bluffing, often rely on higher-order social inference, i.e., understanding how others infer oneself. Such intricate reasoning can be effectively modeled through nested multi-agent reasoning. Nonetheless, the computational complexity escalates exponentially with each level of reasoning, posing a significant challenge. However, humans effortlessly perform complex social inferences as part of their daily lives. To bridge the gap between human-like inference capabilities and computational limitations, we propose a novel approach: leveraging neural networks to amortize high-order social inference, thereby expediting nested multi-agent reasoning. We evaluate our method in two challenging multi-agent interaction domains. The experimental results demonstrate that our method is computationally efficient while exhibiting minimal degradation in accuracy.

For agents

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

get_harvested_code_for_paper("2308.11071")
get_code_for_paper("2308.11071")
have("2308.11071")

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

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

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

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

Connect an agent — have() is free.