SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.14023 · ICCV · 2021

AgentFormer: Agent-Aware Transformers for Socio-Temporal Multi-Agent Forecasting

Ye Yuan, Kris Kitani, Xinshuo Weng, Yanglan Ou, Agentformer Encoder, Agentformer Decoder

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 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, 1 violated it and 10 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2103.14023.json · badge: /api/ran/2103.14023.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
Khrylx/AgentFormer canonical (classifier label)
classifier basis: census
14 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_motion_mse Ran
ran on a synthesized input
Khrylx/AgentFormer/model/agentformer_loss.py
code served (permissive licence) · get_code("d328d7d027ef837d")
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 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)

# Construct the data dict with required keys
batch_size = 2
motion_dim = 4
future_steps = 3

data = {
    'fut_motion_orig': torch.randn(batch_size, future_steps, motion_dim),
    'train_dec_motion': torch.randn(batch_size, future_steps, motion_dim),
    'fut_mask': torch.ones(batch_size, future_steps),
}

# Construct the config dict
cfg = {
    'mask': True,
    'normalize': True,
    'weight': 0.5,
}

ARGS = {
    'data': data,
    'cfg': cfg,
}
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 1, 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
compute_sample_loss Ran
ran on a synthesized input
Khrylx/AgentFormer/model/agentformer_loss.py
code served (permissive licence) · get_code("27e6bed86bfe75d0")
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 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)

# Create sample data dictionary
batch_size = 2
num_future_steps = 3
num_infer_modes = 4
motion_dim = 5

data = {
    'infer_dec_motion': torch.randn(batch_size, num_infer_modes, num_future_steps, motion_dim),
    'fut_motion_orig': torch.randn(batch_size, num_future_steps, motion_dim),
    'fut_mask': torch.ones(batch_size, num_future_steps, dtype=torch.bool),
}

# Create config dictionary
cfg = {
    'mask': True,
    'normalize': True,
    'weight': 1.0,
}

ARGS = {
    'data': data,
    'cfg': cfg,
}
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 1, 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
compute_z_kld Ran
ran on a synthesized input
Khrylx/AgentFormer/model/dlow.py
code served (permissive licence) · get_code("7dd2a5c1f5974656")
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 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
from torch.distributions import Normal

torch.manual_seed(0)

# Create mock distribution objects that support kl() method and sum()
class MockDistribution:
    def __init__(self, batch_size=2):
        self.batch_size = batch_size
        self.mean = torch.randn(batch_size, 4)
        self.std = torch.ones(batch_size, 4)
    
    def kl(self, other):
        # Return a tensor of shape (batch_size, dim) representing KL divergence
        # kl() is called on q_z_dist_dlow with p_z_dist_infer as argument
        return torch.randn(self.batch_size, 4).abs()

# Create data dict with required keys
batch_size = 2
data = {
    'q_z_dist_dlow': MockDistribution(batch_size=batch_size),
    'p_z_dist_infer': MockDistribution(batch_size=batch_size),
    'batch_size': batch_size,
}

# Create config dict with required keys and methods
cfg = {
    'normalize': True,
    'min_clip': -1e6,
    'weight': 0.5,
}

# Wrap cfg in a class that supports both dict access and .get()
class Config(dict):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.__dict__ = self

cfg = Config(cfg)

ARGS = {
    'data': data,
    'cfg': cfg,
}
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 1, 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
Khrylx/AgentFormer/model/common/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 Conv2d. 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
Khrylx/AgentFormer/model/common/resnet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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 Conv2d. 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)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
diversity_loss Ran
ran on a synthesized input
Khrylx/AgentFormer/model/dlow.py
code served (permissive licence) · get_code("82eee2c876ef54f2")
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 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)

# Construct the data dict with required tensor
batch_size = 2
seq_len = 3
motion_dim = 4

# infer_dec_motion needs shape that can be viewed as (*shape[:2], -1)
# Using shape (batch_size, seq_len, motion_dim) which views to (batch_size, seq_len, motion_dim)
infer_dec_motion = torch.randn(batch_size, seq_len, motion_dim)

data = {
    'infer_dec_motion': infer_dec_motion,
    'batch_size': batch_size
}

# Construct config dict with required keys
cfg = {
    'd_scale': 1.0,
    'weight': 0.5,
    'normalize': True
}

ARGS = {
    'data': data,
    'cfg': cfg
}
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 1, 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
generate_ar_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Khrylx/AgentFormer/model/agentformer.py
code served (permissive licence) · get_code("1b373d997a81df48")
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 (6, 6) 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)

# Analyze the function:
# - sz: int, must be divisible by agent_num
# - agent_num: int, divides sz
# - agent_mask: a tensor that supports .repeat(T, T) method
#   The function treats it as a 2D mask that gets repeated
#   Looking at usage: mask[i1:i2, i2:] = float('-inf')
#   So agent_mask should be a 2D tensor of shape (agent_num, agent_num)

# Create a small agent_mask tensor
# agent_num = 2, so agent_mask is (2, 2)
agent_num = 2
agent_mask = torch.ones(agent_num, agent_num)

# sz must be divisible by agent_num
# Let's use sz = 6, so T = 3
sz = 6

ARGS = {
    "sz": sz,
    "agent_num": agent_num,
    "agent_mask": agent_mask,
}
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 Tensor, ndim 2, dtype family float, shape (6, 6) — shape (6, 6) 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
generate_mask Ran
ran, violated the contract we drafted
Khrylx/AgentFormer/model/agentformer.py
code served (permissive licence) · get_code("66d9c97d20cb3bfd")
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 (4, 9) 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)

# Analyze the function:
# - tgt_sz: integer (target size)
# - src_sz: integer (source size)
# - agent_num: integer (number of agents)
# - agent_mask: a tensor that supports .repeat() method
#
# The function:
# 1. Asserts tgt_sz % agent_num == 0 and src_sz % agent_num == 0
# 2. Calls agent_mask.repeat(tgt_sz // agent_num, src_sz // agent_num)
# 3. Returns the result
#
# agent_mask needs to be a 2D tensor since repeat is called with 2 arguments

# Choose values that satisfy the divisibility constraints
# Use distinct sizes for clarity
tgt_sz = 8
src_sz = 6
agent_num = 2

# agent_mask should be a 2D boolean or numeric tensor
# Shape can be small, e.g., (1, 1) or (2, 3)
agent_mask = torch.tensor([[True, False, True]], dtype=torch.bool)

ARGS = {
    "tgt_sz": tgt_sz,
    "src_sz": src_sz,
    "agent_num": agent_num,
    "agent_mask": agent_mask
}
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 Tensor, ndim 2, dtype family float, shape (4, 9) — shape (4, 9) 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_flat_params_from Ran
ran on a synthesized input
Khrylx/AgentFormer/utils/torch.py
code served (permissive licence) · get_code("748ebf6d58779d56")
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 1, dtype family float, shape (59,) 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 torch.nn as nn

torch.manual_seed(0)

# Create a simple model with some parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Create another model with different dimensions
class AnotherModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(5, 6)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate models
model1 = SimpleModel()
model2 = AnotherModel()

ARGS = {
    'models': (model1, model2)
}
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 1, dtype family float, shape (59,) — shape (59,) 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
isfloat Ran
ran on a synthesized input
Khrylx/AgentFormer/utils/utils.py
code served (permissive licence) · get_code("664e282ebf0d3ef6")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function isfloat() takes one parameter: float_test
# It checks if float_test is an instance of float
# So we need to provide a value that could be tested

ARGS = {
    "float_test": 3.14
}
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 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
isinteger Ran
ran on a synthesized input
Khrylx/AgentFormer/utils/utils.py
code served (permissive licence) · get_code("7795043c27738a7a")
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

ARGS = {
    "integer_test": 42
}
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
isnparray Ran
ran on a synthesized input
Khrylx/AgentFormer/utils/utils.py
code served (permissive licence) · get_code("e58bf86f2419f13f")
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

# Create a valid numpy array
nparray_test = np.array([1, 2, 3, 4, 5])

ARGS = {
    "nparray_test": nparray_test
}
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
recon_loss Ran
ran on a synthesized input
Khrylx/AgentFormer/model/dlow.py
code served (permissive licence) · get_code("7a165e35db87d53d")
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 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)

# Build minimal data dict with required tensors
batch_size = 2
num_future_steps = 5
num_candidates = 3
motion_dim = 4

data = {
    'infer_dec_motion': torch.randn(batch_size, num_candidates, num_future_steps, motion_dim),
    'fut_motion_orig': torch.randn(batch_size, num_future_steps, motion_dim),
    'fut_mask': torch.ones(batch_size, num_future_steps, dtype=torch.float32),
}

# Build minimal config dict with required keys
cfg = {
    'mask': True,
    'normalize': True,
    'weight': 0.5,
}

ARGS = {
    'data': data,
    'cfg': cfg,
}
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 1, 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
rotation_2d_torch Ran
ran on a synthesized input
Khrylx/AgentFormer/utils/torch.py
code served (permissive licence) · get_code("bf9596e8a6a6b696")
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)

# Create a small 2D point tensor
# Shape: (batch_size=2, coordinates=2)
x = torch.tensor([
    [1.0, 2.0],
    [3.0, 4.0]
], dtype=torch.float32)

# Rotation angle in radians
theta = torch.tensor(0.785398, dtype=torch.float32)  # ~45 degrees

# Optional origin parameter (can be None or a 2D point)
origin = None

ARGS = {
    "x": x,
    "theta": theta,
    "origin": origin
}
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
batch_to Not yet run
unverified (harvested, no recorded run)
Khrylx/AgentFormer/utils/torch.py
pointer only (licence: MIT); the stored copy get_code serves, from xccyue/MutualDistance, is pointer only (licence: NONE) · get_code("f6e42d1a52522ffb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xccyue/MutualDistance, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

compute_z_kld Not yet run
unverified (harvested, no recorded run)
Khrylx/AgentFormer/model/agentformer_loss.py
code served (permissive licence) · get_code("f19fb436bd1c1362")
How it ran

no invocation recorded.

resnet18 Not yet run
unverified (harvested, no recorded run)
Khrylx/AgentFormer/model/common/resnet.py
code served (permissive licence) · get_code("17abbd201c85e08b")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
conv1x1 431 other papers
108 dated earlier, 5 the same month, 312 later, 5 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
63 dated earlier, 2 the same month, 243 later, 3 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
resnet18 95 other papers
22 dated earlier, 70 later, 2 same year, order not determinable, 1 undated
1805.00907 (2018-05)
Glow: Graph Lowering Compiler Techniques for Neural Networks
1902.08153 (2019-02)
Learned Step Size Quantization
1904.01355 (2019-04)
FCOS: Fully Convolutional One-Stage Object Detection
and 92 more not named here
batch_to 2 other papers
2 later
aaai_25754 (2023 (year only))
Human Joint Kinematics Diffusion-Refinement for Stochastic Motion Prediction
2310.00615 (2023-10)
Scene-aware Human Motion Forecasting via Mutual Distance Prediction
generate_ar_mask 1 other paper
1 later
2307.09306 (2023-07)
EigenTrajectory: Low-Rank Descriptors for Multi-Modal Trajectory Forecasting
generate_mask 1 other paper
1 later
2307.09306 (2023-07)
EigenTrajectory: Low-Rank Descriptors for Multi-Modal Trajectory Forecasting
get_flat_params_from 1 other paper
1 later
aaai_25754 (2023 (year only))
Human Joint Kinematics Diffusion-Refinement for Stochastic Motion Prediction

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

Predicting accurate future trajectories of multiple agents is essential for autonomous systems but is challenging due to the complex interaction between agents and the uncertainty in each agent's future behavior. Forecasting multiagent trajectories requires modeling two key dimensions: (1) time dimension, where we model the influence of past agent states over future states; (2) social dimension, where we model how the state of each agent affects others. Most prior methods model these two dimensions separately, e.g., first using a temporal model to summarize features over time for each agent independently and then modeling the interaction of the summarized features with a social model. This approach is suboptimal since independent feature encoding over either the time or social dimension can result in a loss of information. Instead, we would prefer a method that allows an agent's state at one time to directly affect another agent's state at a future time. To this end, we propose a new Transformer, termed AgentFormer, that simultaneously models the time and social dimensions. The model leverages a sequence representation of multi-agent trajectories by flattening trajectory features across time and agents. Since standard attention operations disregard the agent identity of each element in the sequence, AgentFormer uses a novel agent-aware attention mechanism that preserves agent identities by attending to elements of the same agent differently than elements of other agents. Based on AgentFormer, we propose a stochastic multi-agent trajectory prediction model that can attend to features of any agent at any previous timestep when inferring an agent's future position. The latent intent of all agents is also jointly modeled, allowing the stochasticity in one agent's behavior to affect other agents. Extensive experiments show that our method significantly improves the state of the art on wellestablished pedestrian and autonomous driving datasets.

For agents

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

get_harvested_code_for_paper("2103.14023")
get_code_for_paper("2103.14023")
have("2103.14023")

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

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

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

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

Connect an agent — have() is free.