SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.06948 · 2020

Scalable Graph Networks for Particle Simulations

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 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/2010.06948.json · badge: /api/ran/2010.06948.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
KarolisMart/scalable-gnns canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
PBC_MSE_loss Ran
ran on a synthesized input
KarolisMart/scalable-gnns/model.py
code served (permissive licence) · get_code("059b530cfe806199")
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

torch.manual_seed(0)

# Create small tensors for output and target
# The function uses distances[:, :, -4:-2], so we need at least 4 features in the last dimension
# Shape: (batch=2, num_atoms=3, features=4)
output = torch.randn(2, 3, 4)
target = torch.randn(2, 3, 4)

# box_size is used in the apply_PBC_to_distances function
box_size = 6

ARGS = {
    "output": output,
    "target": target,
    "box_size": box_size,
}
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 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
apply_PBC_to_coordinates Ran
ran on a synthesized input
KarolisMart/scalable-gnns/model.py
code served (permissive licence) · get_code("3eb6bbe77764dd78")
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 3, dtype family float, shape (2, 2, 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)

# The function applies periodic boundary conditions to coordinates
# It expects a tensor with shape (..., N, M) where the last dimension contains coordinates
# The function indexes [:, :, -4:-2] which means it's accessing elements at indices -4 and -3
# (the 4th and 3rd from the end of the last dimension)
# So we need a tensor with at least 4 elements in the last dimension

# Create a coordinates tensor with shape (batch=2, num_particles=2, features=6)
# where the last 4 features include the coordinates we're modifying
coordinates = torch.randn(2, 2, 6, dtype=torch.float32)

# The function modifies coordinates in-place, so we need a mutable tensor
# Let's set some specific values to test the boundary conditions
coordinates[:, :, -4:-2] = torch.tensor([
    [[3.5, 3.5], [2.5, 2.5]],
    [[-3.5, -3.5], [-2.5, -2.5]]
], dtype=torch.float32)

box_size = 6

ARGS = {
    "coordinates": coordinates,
    "box_size": box_size,
}
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 3, dtype family float, shape (2, 2, 6) — shape (2, 2, 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
apply_PBC_to_distances Ran
ran on a synthesized input
KarolisMart/scalable-gnns/model.py
code served (permissive licence) · get_code("b9295de858190369")
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 3, dtype family float, shape (2, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function operates on distances tensor with shape indexing [:, :, -4:-2]
# This means we need at least 3 dimensions, with the last dimension being at least 2 elements
# (to access indices -4 to -2, we need at least 4 elements in the last dimension)
# Let's create a tensor with shape (batch=2, num_pairs=3, features=5)
# where the last 4 elements (indices -4:-2 means elements at -4 and -3) will be modified

distances = torch.randn(2, 3, 5)

# Set box_size parameter
box_size = 6

ARGS = {
    "distances": distances,
    "box_size": box_size
}
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 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) 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
full_graph_senders_and_recievers Ran
ran on a synthesized input
KarolisMart/scalable-gnns/util.py
code served (permissive licence) · get_code("7eed0440e91c5014")
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 int; no output shape is stated. 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 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)

ARGS = {
    "n_particles": 5,
    "batch_size": 2,
    "device": torch.device("cpu"),
}
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 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
get_accelerations Ran
ran on a synthesized input
KarolisMart/scalable-gnns/data.py
code served (permissive licence) · get_code("039305975f9656d3")
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 2, dtype family float, shape (3, 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

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

# Create small sample data
num_particles = 4
m = np.array([1.0, 2.0, 1.5, 0.5])  # masses for each particle
x = np.random.randn(num_particles, 2) * 2  # positions in 2D, shape (4, 2)
physical_const = 2.0
box_size = 6.0
prediction_mask = np.array([True, True, False, True], dtype=bool)  # mask for which particles to return
softening = True
softening_radius = 0.5
charge = np.array([1.0, -1.0, 0.5, -0.5])  # charges for each particle

ARGS = {
    "m": m,
    "x": x,
    "physical_const": physical_const,
    "box_size": box_size,
    "prediction_mask": prediction_mask,
    "softening": softening,
    "softening_radius": softening_radius,
    "charge": charge,
}
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 2, dtype family float, shape (3, 2) — shape (3, 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
get_accelerations_gpu Ran
ran on a synthesized input
KarolisMart/scalable-gnns/data.py
code served (permissive licence) · get_code("d3965bce2c32e0c5")
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 (3, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct valid arguments for get_accelerations_gpu
# Parameters: m, x, physical_const=2, box_size=6, prediction_mask=None, softening=False, softening_radius=0.5

# m: mass array for particles - shape (n_particles,)
m = torch.tensor([1.0, 2.0, 3.0, 1.5], dtype=torch.float32)

# x: positions of particles - shape (n_particles, 2) for 2D positions
x = torch.tensor([
    [0.5, 1.0],
    [2.0, 1.5],
    [0.1, 0.2],
    [3.0, 2.5]
], dtype=torch.float32)

# physical_const: gravitational constant or similar
physical_const = 2

# box_size: size of periodic boundary box
box_size = 6

# prediction_mask: boolean mask for which particles to predict accelerations for
# None means all particles, but let's also test with a specific mask
prediction_mask = torch.tensor([True, True, False, True], dtype=torch.bool)

# softening: whether to use softening
softening = False

# softening_radius: softening parameter
softening_radius = 0.5

ARGS = {
    "m": m,
    "x": x,
    "physical_const": physical_const,
    "box_size": box_size,
    "prediction_mask": prediction_mask,
    "softening": softening,
    "softening_radius": softening_radius
}
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 (3, 2) — shape (3, 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
get_cells Ran
ran on a synthesized input
KarolisMart/scalable-gnns/util.py
code served (permissive licence) · get_code("eaa7fe288a06cc49")
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 list. 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

torch.manual_seed(0)

# The function expects:
# - ids: array-like that supports indexing with boolean masks
# - positions: 2D array with shape (N, 2) supporting indexing with boolean masks
# - levels_remaining: int
# - ref_point: list of 2 floats (default [0, 0])
# - box_size: float (default 6)

# Create small test data
n_points = 4
ids = np.array([10, 20, 30, 40])
positions = np.array([
    [-1.0, 1.0],   # x_neg, y_pos -> cell 1
    [1.0, 1.0],    # x_pos, y_pos -> cell 2
    [-1.0, -1.0],  # x_neg, y_neg -> cell 3
    [1.0, -1.0]    # x_pos, y_neg -> cell 4
], dtype=np.float32)

ARGS = {
    "ids": ids,
    "positions": positions,
    "levels_remaining": 2,
    "ref_point": [0, 0],
    "box_size": 6
}
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 list — a list 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
nn_graph_senders_and_recievers Ran
ran on a synthesized input
KarolisMart/scalable-gnns/util.py
code served (permissive licence) · get_code("c09cf84f33befece")
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 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)

# Build minimal arguments for nn_graph_senders_and_recievers
# The function expects:
# - current_state: tensor of shape (batch_size, n_particles, feature_dim)
#   The function uses current_state[:, indices, -4:-2] and current_state[:, i, -4:-2]
#   So it needs at least 4 features in the last dimension (positions at indices -4:-2)
# - n_neighbours: int, number of neighbors to find
# - box_size: float, for periodic boundary conditions
# - device: torch device

batch_size = 2
n_particles = 5
feature_dim = 4  # needs at least 4 features for the slicing [-4:-2]

# Create current_state with positions in last 2 dimensions
# Shape: (batch_size, n_particles, feature_dim)
current_state = torch.randn(batch_size, n_particles, feature_dim)

n_neighbours = 2
box_size = 6.0
device = torch.device('cpu')

ARGS = {
    'current_state': current_state,
    'n_neighbours': n_neighbours,
    'box_size': box_size,
    'device': device
}
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 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
leapfrog Not yet run
unverified (harvested, no recorded run)
KarolisMart/scalable-gnns/data.py
code served (permissive licence) · get_code("d76fb96738dbf8eb")
How it ran

no invocation recorded.

plot_trajectory Not yet run
unverified (harvested, no recorded run)
KarolisMart/scalable-gnns/visualize.py
code served (permissive licence) · get_code("5b3b050adfb1a17b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

Learning system dynamics directly from observations is a promising direction in machine learning due to its potential to significantly enhance our ability to understand physical systems. However, the dynamics of many real-world systems are challenging to learn due to the presence of nonlinear potentials and a number of interactions that scales quadratically with the number of particles $N$, as in the case of the N-body problem. In this work, we introduce an approach that transforms a fully-connected interaction graph into a hierarchical one which reduces the number of edges to $O(N)$. This results in linear time and space complexity while the pre-computation of the hierarchical graph requires $O(N\log (N))$ time and $O(N)$ space. Using our approach, we are able to train models on much larger particle counts, even on a single GPU. We evaluate how the phase space position accuracy and energy conservation depend on the number of simulated particles. Our approach retains high accuracy and efficiency even on large-scale gravitational N-body simulations which are impossible to run on a single machine if a fully-connected graph is used. Similar results are also observed when simulating Coulomb interactions. Furthermore, we make several important observations regarding the performance of this new hierarchical model, including: i) its accuracy tends to improve with the number of particles in the simulation and ii) its generalisation to unseen particle counts is also much better than for models that use all $O(N^2)$ interactions.

For agents

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

get_harvested_code_for_paper("2010.06948")
get_code_for_paper("2010.06948")
have("2010.06948")

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

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

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

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

Connect an agent — have() is free.