SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.06131 · NeurIPS · 2022

Seeing the forest and the tree: Building representations of both individual and collective dynamics with transformers

Mehdi Azabou, Eva Dyer, Ran Liu, Max Dabagia, Jingyun Xiao

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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 8 have no contract verdict; 0 failures of our instrument; 2 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/2206.06131.json · badge: /api/ran/2206.06131.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
nerdslab/EIT canonical (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
FunctionStatusWhere it lives
bicubic_upsample Ran
ran on a synthesized input
nerdslab/EIT/my_transformers/model_utils.py
code served (permissive licence) · get_code("3f7682da16e16c04")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small tensor with shape (B, N, C) where N = H * W
B = 2  # batch size
H = 4  # height
W = 3  # width
C = 5  # channels
N = H * W  # total spatial tokens

x = torch.randn(B, N, C)

ARGS = {
    'x': x,
    'H': H,
    'W': W,
    'size': 2
}
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 — 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_acc Ran
ran on a synthesized input
nerdslab/EIT/my_transformers/tasks.py
code served (permissive licence) · get_code("c6c224933f8c029e")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Build a minimal model that takes input and produces 2-class output
class SimpleClassifier(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.fc(x)

# Build a data loader (list of dicts with 'A' and 'B' keys)
# Each sample has tensors of shape (batch_size, 4)
c_loader = [
    {
        'A': torch.randn(2, 4),
        'B': torch.randn(3, 4)
    },
    {
        'A': torch.randn(2, 4),
        'B': torch.randn(3, 4)
    }
]

model = SimpleClassifier()

ARGS = {
    'model': model,
    'c_loader': c_loader
}
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 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
compute_wasserstein_distance Ran
ran on a synthesized input
nerdslab/EIT/ot_distance_funcs.py
code served (permissive licence) · get_code("cd81c1424a0abd75")
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 numpy as np
import ot

# Create small sample data for source and target distributions
# xs: source samples (n samples, d dimensions)
# xt: target samples (m samples, d dimensions)

np.random.seed(0)

# Create source distribution: 2 samples, 4 dimensions
xs = np.random.randn(2, 4).astype(np.float64)

# Create target distribution: 3 samples, 4 dimensions (different size to be distinct)
xt = np.random.randn(3, 4).astype(np.float64)

ARGS = {
    "xs": xs,
    "xt": xt,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, ot — 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
coords2state Ran
ran on a synthesized input
nerdslab/EIT/synthetic_data_twobody.py
code served (permissive licence) · get_code("53c1c93a6c13ac37")
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 ndarray, ndim 3, dtype family float, shape (2, 3, 3) 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 small coordinates array
# The function expects shape (timesteps, ...) where coords.T will be reshaped
# coords.shape[0] = timesteps, so we need at least 2D array
# After transpose, coords.T has shape (features, timesteps)
# Then reshape to (-1, nbodies, timesteps) means features must divide by nbodies evenly
# For nbodies=2, we need features divisible by 2. Let's use 4 features, 3 timesteps
timesteps = 3
nbodies = 2
features = 4  # Must be divisible by nbodies

coords = np.random.randn(timesteps, features)

ARGS = {
    "coords": coords,
    "nbodies": nbodies,
    "mass": 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 ndarray, ndim 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 3) 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
kinetic_energy Ran
ran on a synthesized input
nerdslab/EIT/synthetic_utils.py
code served (permissive licence) · get_code("27e2bdc4ea1c263b")
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 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)

# Analyze the function:
# - state is indexed as state[:, 0:1], state[:, 3:5]
# - state[:, 0:1] extracts column 0 (mass values)
# - state[:, 3:5] extracts columns 3-4 (velocity components)
# - Operations: sum over dimension 1, keepdims, sum over dimension 0, squeeze
# - state needs shape (batch_size, num_features) where num_features >= 5
# - batch_size should be 2 (tiny), num_features = 5 to have indices 0, 1, 2, 3, 4

state = torch.randn(2, 5)

ARGS = {
    "state": state
}
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 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
pair Ran
ran, violated the contract we drafted
nerdslab/EIT/my_transformers/model_utils.py
code served (permissive licence) · get_code("6ba8cee9f5daea41")
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 1, dtype family int; 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)

# The function 'pair' takes a single parameter 't' and returns it as a tuple if it isn't already one
# We need to test both cases: when t is a tuple and when it's not

# Case 1: t is not a tuple (e.g., an integer, string, tensor, etc.)
t_not_tuple = 5

# Case 2: t is already a tuple
t_is_tuple = (3, 7)

# We'll use the non-tuple case as the primary test
ARGS = {
    "t": t_not_tuple
}
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 1, dtype family int — 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
plot_construct Ran
ran on a synthesized input
nerdslab/EIT/my_transformers/tasks.py
code served (permissive licence) · get_code("9ee750447e957be5")
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 Figure. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

class SimpleAutoencoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Linear(12, 8)
        self.decoder = nn.Linear(8, 12)
    
    def forward(self, x):
        batch_size = x.shape[0]
        x_flat = x.view(batch_size, -1)
        encoded = self.encoder(x_flat)
        decoded = self.decoder(encoded)
        reconstructed = decoded.view(x.shape)
        return reconstructed

model = SimpleAutoencoder()

dataA = torch.randn(4, 3, 2, 2)
dataB = torch.randn(4, 3, 2, 2)

data = {
    'A': dataA,
    'B': dataB
}

ARGS = {
    'model': model,
    'data': data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
potential_energy Ran
ran on a synthesized input
nerdslab/EIT/synthetic_utils.py
code served (permissive licence) · get_code("8d47c174ab87a469")
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 ndarray, ndim 1, dtype family float, shape (3,) 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 state tensor with shape (n_bodies, features, n_timesteps)
# features: [mass, x_pos, y_pos, ...]
# n_bodies = 2, features = 4, n_timesteps = 3
state = np.random.randn(2, 4, 3).astype(np.float32)

# Ensure masses are positive
state[:, 0:1, :] = np.abs(state[:, 0:1, :]) + 1.0

# Ensure positions are not zero (to avoid division by zero)
state[:, 1:3, :] = state[:, 1:3, :] + 5.0

ARGS = {
    "state": state
}
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 ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) 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
total_energy Ran
ran on a synthesized input
nerdslab/EIT/synthetic_utils.py
code served (permissive licence) · get_code("287e459510bf2466")
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 ndarray, 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 numpy as np

# Create a state array representing particles with:
# - Column 0: mass (m_i)
# - Columns 1-2: position (x, y)
# - Columns 3-4: velocity (vx, vy)
# Shape: (num_particles, 5 features, batch_size)

num_particles = 3
num_features = 5
batch_size = 2

state = np.random.randn(num_particles, num_features, batch_size).astype(np.float32)

# Ensure masses are positive
state[:, 0:1, :] = np.abs(state[:, 0:1, :]) + 1.0

# Ensure positions are non-zero to avoid division by zero
state[:, 1:3, :] = state[:, 1:3, :] + 5.0

ARGS = {
    "state": state
}
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 ndarray, 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
compute_OT Not yet run
unverified (harvested, no recorded run)
nerdslab/EIT/ot_distance_funcs.py
code served (permissive licence) · get_code("c864e744d77241f0")
How it ran

no invocation recorded.

pixel_upsample Not yet run
unverified (harvested, no recorded run)
nerdslab/EIT/my_transformers/model_utils.py
code served (permissive licence) · get_code("4de0dd48e0b9b65f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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, 1 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
pair 90 other papers
20 dated earlier, 69 later, 1 undated · 8 only as an assembly brick
2004.13649 (2020-04)
Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.15691 (2021-03)
ViViT: A Video Vision Transformer
and 87 more not named here

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

Complex time-varying systems are often studied by abstracting away from the dynamics of individual components to build a model of the population-level dynamics from the start. However, when building a population-level description, it can be easy to lose sight of each individual and how they contribute to the larger picture. In this paper, we present a novel transformer architecture for learning from time-varying data that builds descriptions of both the individual as well as the collective population dynamics. Rather than combining all of our data into our model at the onset, we develop a separable architecture that operates on individual time-series first before passing them forward; this induces a permutation-invariance property and can be used to transfer across systems of different size and order. After demonstrating that our model can be applied to successfully recover complex interactions and dynamics in many-body systems, we apply our approach to populations of neurons in the nervous system. On neural activity datasets, we show that our model not only yields robust decoding performance, but also provides impressive performance in transfer across recordings of different animals without any neuron-level correspondence. By enabling flexible pre-training that can be transferred to neural recordings of different size and order, our work provides a first step towards creating a foundation model for neural decoding.

For agents

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

get_harvested_code_for_paper("2206.06131")
get_code_for_paper("2206.06131")
have("2206.06131")

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

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

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

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

Connect an agent — have() is free.