SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.14642 · NeurIPS · 2023

Newton-Cotes Graph Neural Networks: On the Time Evolution of Dynamic Systems

Zhuo Chen, Ningyu Zhang, Huajun Chen, Qiang Zhang, Lingbing Guo, Weiqing Wang, Zequn Sun, Yixuan Lai

arXiv · PDF · Open in the Atlas

Code that ran

15 of 21 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (9 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 4 failures of our instrument; 6 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/2305.14642.json · badge: /api/ran/2305.14642.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
zjukg/ncgnn canonical (classifier label)
classifier basis: classifier_2025
12 ran · 6 no recorded run
zjukg/NCGNN canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
Baseline Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("54596a980158eb3c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Baseline: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    '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 Baseline — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Baseline 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
E_GCL Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("c407e8ea4fd357eb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, E_GCL: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'input_nf': 4,
    'output_nf': 5,
    'hidden_nf': 8,
    'edges_in_d': 2,
    'nodes_att_dim': 3,
    'act_fn': nn.ReLU(),
    'recurrent': True,
    'coords_weight': 1.0,
    'attention': False,
    'clamp': False,
    'norm_diff': False,
    'tanh': False,
}
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 E_GCL — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a E_GCL 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
GCL Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("cef03f210511ffce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GCL: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    "input_nf": 4,
    "output_nf": 5,
    "hidden_nf": 8,
    "edges_in_nf": 3,
    "act_fn": nn.ReLU(),
    "bias": True,
    "attention": False,
    "t_eq": False,
    "recurrent": True,
}
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 GCL — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GCL 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
GCL_rf_vel Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("4a8d3e616b10b7d0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GCL_rf_vel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

# Build the arguments for GCL_rf_vel
nf = 64
edge_attr_nf = 2

act_fn = nn.LeakyReLU(0.2)
coords_weight = 1.0

ARGS = {
    'nf': nf,
    'edge_attr_nf': edge_attr_nf,
    'act_fn': act_fn,
    'coords_weight': coords_weight,
}
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 GCL_rf_vel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GCL_rf_vel 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
GMNLayer Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("90ba9935916d1f63")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GMNLayer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'input_nf': 4,
    'output_nf': 5,
    'hidden_nf': 6,
    'edges_in_d': 3,
    'nodes_att_dim': 2,
    'act_fn': nn.ReLU(),
    'recurrent': True,
    'coords_weight': 1.0,
    'attention': False,
    'norm_diff': False,
    'tanh': False,
    'learnable': False,
}
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 GMNLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GMNLayer 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
GNN Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("de28ce446503e1fc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GNN: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

# Create small tensors for testing
# nodes: shape (num_nodes, input_dim)
num_nodes = 2
input_dim = 4
nodes = torch.randn(num_nodes, input_dim)

# edges: shape (2, num_edges) - edge indices
num_edges = 3
edges = torch.tensor([[0, 1, 0], [1, 0, 1]], dtype=torch.long)

# edge_attr: shape (num_edges, edge_attr_dim)
# Looking at GCL.__init__, edges_in_nf=1+1=2, so edge_attr should have 2 features
edge_attr = torch.randn(num_edges, 2)

ARGS = {
    'input_dim': input_dim,
    'hidden_nf': 8,
    'device': 'cpu',
    'act_fn': nn.SiLU(),
    'n_layers': 2,
    'attention': 0,
    'recurrent': False,
}
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 GNN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GNN 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
Linear Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("1384bf3b341fde12")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Linear: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'input_nf': 4,
    'output_nf': 3,
    '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 Linear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Linear 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
Linear_dynamics Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("46bee0f30ef5a479")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Linear_dynamics: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    '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 Linear_dynamics — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Linear_dynamics 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
RF_vel Ran
ran on a synthesized input · constructed an object; no result was computed
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("2879c626b2466678")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, RF_vel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

# Define the helper function and classes from the problem
def unsorted_segment_mean(data, segment_ids, num_segments):
    result_shape = (num_segments, data.size(1))
    segment_ids = segment_ids.unsqueeze(-1).expand(-1, data.size(1))
    result = data.new_full(result_shape, 0)
    count = data.new_full(result_shape, 0)
    result.scatter_add_(0, segment_ids, data)
    count.scatter_add_(0, segment_ids, torch.ones_like(data))
    return result / count.clamp(min=1)

class GCL_rf_vel(nn.Module):
    def __init__(self, nf=64, edge_attr_nf=0, act_fn=nn.LeakyReLU(0.2), coords_weight=1.0):
        super(GCL_rf_vel, self).__init__()
        self.coords_weight = coords_weight
        self.coord_mlp_vel = nn.Sequential(nn.Linear(1, nf), act_fn, nn.Linear(nf, 1))
        layer = nn.Linear(nf, 1, bias=False)
        torch.nn.init.xavier_uniform_(layer.weight, gain=0.001)
        self.phi = nn.Sequential(nn.Linear(1 + edge_attr_nf, nf), act_fn, layer, nn.Tanh())

    def forward(self, x, vel_norm, vel, edge_index, edge_attr=None):
        row, col = edge_index
        edge_m = self.edge_model(x[row], x[col], edge_attr)
        new_x = self.node_model(x, edge_index, edge_m)
        new_vel = vel * self.coord_mlp_vel(vel_norm)
        new_x = new_x + new_vel
        return (new_x, new_vel)

    def edge_model(self, source, target, edge_attr):
        x_diff = source - target
        radial = torch.sqrt(torch.sum(x_diff ** 2, dim=1)).unsqueeze(1)
        e_input = torch.cat([radial, edge_attr], dim=1)
        e_out = self.phi(e_input)
        m_ij = x_diff * e_out
        return m_ij

    def node_model(self, x, edge_index, edge_m):
        row, col = edge_index
        agg = unsorted_segment_mean(edge_m, row, num_segments=x.size(0))
        x_out = x + agg * self.coords_weight
        return x_out

class RF_vel(nn.Module):
    def __init__(self, hidden_nf, edge_attr_nf=0, device='cpu', act_fn=nn.SiLU(), n_layers=4):
        super(RF_vel, self).__init__()
        self.hidden_nf = hidden_nf
        self.device = device
        self.n_layers = n_layers
        for i in range(0, n_layers):
            self.add_module('gcl_%d' % i, GCL_rf_vel(nf=hidden_nf, edge_attr_nf=edge_attr_nf, act_fn=act_fn))
        self.to(self.device)

    def forward(self, vel_norm, x, edges, vel, edge_attr):
        for i in range(0, self.n_layers):
            x, vel = self._modules['gcl_%d' % i](x, vel_norm, vel, edges, edge_attr)
        return (x, vel)

# Create test data
num_nodes = 2
num_edges = 3
node_dim = 4
edge_attr_nf = 5
hidden_nf = 8

# Tensor shapes: (num_nodes, node_dim)
x = torch.randn(num_nodes, node_dim)
vel_norm = torch.randn(num_nodes, 1)
vel = torch.randn(num_nodes, node_dim)

# Edge index: (2, num_edges) with edge indices
edges = torch.tensor([[0, 1, 0], [1, 0, 1]], dtype=torch.long)

# Edge attributes: (num_edges, edge_attr_nf)
edge_attr = torch.randn(num_edges, edge_attr_nf)

ARGS = {
    'hidden_nf': hidden_nf,
    'edge_attr_nf': edge_attr_nf,
    'device': 'cpu',
    'act_fn': nn.SiLU(),
    'n_layers': 4
}
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 RF_vel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RF_vel 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
evaluate_accuracy Ran
ran on a synthesized input
zjukg/NCGNN/EqMotion/main_nbody.py
code served (permissive licence) · get_code("a4b4fa49d6e48181")
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 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)

# Construct pred_logit: shape (batch=2, height=4, width=4, num_classes=2)
# The function accesses pred_logit.shape[-1] and uses torch.max with dim=-1
# It also indexes with [0:3] for logging
pred_logit = torch.randn(2, 4, 4, 2)

# Construct gt: shape (batch=2, height=4, width=4)
# The function uses torch.abs(gt), creates a mask with same shape,
# and indexes with [0:3]
gt = torch.randint(0, 2, (2, 4, 4))

# log parameter is a boolean flag
log = False

ARGS = {
    "pred_logit": pred_logit,
    "gt": gt,
    "log": log
}
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 ndarray, 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
get_velocity_attr Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zjukg/ncgnn/spatial_graph/main_ncgnn.py
code served (permissive licence) · get_code("efc11ed98d6d5af4")
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 Tensor, ndim 2, dtype family float, shape (4, 1) 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 the function
# loc: node locations, shape (num_nodes, feature_dim)
# vel: node velocities, shape (num_nodes, feature_dim)
# rows, cols: edge indices

num_nodes = 5
feature_dim = 4

loc = torch.randn(num_nodes, feature_dim)
vel = torch.randn(num_nodes, feature_dim)

# Create edge indices (rows and cols)
# These should be valid indices into loc and vel
rows = torch.tensor([0, 1, 2, 3])
cols = torch.tensor([1, 2, 3, 4])

ARGS = {
    "loc": loc,
    "vel": vel,
    "rows": rows,
    "cols": cols,
}
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 Tensor, ndim 2, dtype family float, shape (4, 1) — shape (4, 1) 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_velocity_attr Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zjukg/NCGNN/spatial_graph/n_body_system/model.py
code served (permissive licence) · get_code("a1ea415560adc94a")
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 Tensor, ndim 2, dtype family float, shape (2, 1) 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)

# Analyze the function:
# - loc: indexed by rows and cols, so it's a tensor of shape (num_nodes, feature_dim)
# - vel: indexed by rows and cols, same structure as loc
# - rows: indices for selecting from loc and vel
# - cols: indices for selecting from loc and vel

# The function computes:
# diff = loc[cols] - loc[rows]  -> shape (num_edges, feature_dim)
# norm = torch.norm(diff, p=2, dim=1).unsqueeze(1)  -> shape (num_edges, 1)
# u = diff / norm  -> shape (num_edges, feature_dim)
# vel[rows] * u  -> element-wise mult, shape (num_edges, feature_dim)
# vel[cols] * u  -> element-wise mult, shape (num_edges, feature_dim)
# torch.sum(..., dim=1).unsqueeze(1)  -> shape (num_edges, 1)

# So loc and vel should be 2D tensors (num_nodes, feature_dim)
# rows and cols should be 1D index tensors

num_nodes = 5
feature_dim = 4
num_edges = 2

loc = torch.randn(num_nodes, feature_dim)
vel = torch.randn(num_nodes, feature_dim)
rows = torch.tensor([0, 1], dtype=torch.long)
cols = torch.tensor([2, 3], dtype=torch.long)

ARGS = {
    "loc": loc,
    "vel": vel,
    "rows": rows,
    "cols": cols,
}
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 Tensor, ndim 2, dtype family float, shape (2, 1) — shape (2, 1) 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
lr_decay Ran
ran, honoured the contract we drafted
zjukg/ncgnn/EqMotion/main_nbody_reasoning.py
code served (permissive licence) · get_code("d967154c60f2573c")
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 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 torch.nn as nn
import torch.optim as optim

torch.manual_seed(0)

# Create a simple model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = optim.SGD(model.parameters(), lr=0.1)

# Define the arguments
ARGS = {
    'optimizer': optimizer,
    'lr_now': 0.1,
    'gamma': 0.5
}
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 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
unsorted_segment_mean Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zjukg/NCGNN/spatial_graph/models/gcl.py
code served (permissive licence) · get_code("bc66f19be57720e7")
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 (2, 4) 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 sample data tensor with shape (batch_size, feature_dim)
# Using distinct sizes: 2 for batch, 4 for features
data = torch.randn(2, 4)

# Create segment_ids tensor that maps each data point to a segment
# Values should be in range [0, num_segments)
segment_ids = torch.tensor([0, 1])

# Number of segments to aggregate into
num_segments = 2

ARGS = {
    "data": data,
    "segment_ids": segment_ids,
    "num_segments": num_segments,
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
unsorted_segment_sum Ran
ran; our contract draft was wrong, not the code
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("dfdf6dc1a0720e57")
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, 4) 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 tiny tensors for testing
# data: shape (batch_size, feature_dim) - the values to sum
# segment_ids: shape (batch_size,) - which segment each row belongs to
# num_segments: int - total number of segments

batch_size = 2
feature_dim = 4
num_segments = 3

data = torch.randn(batch_size, feature_dim)
segment_ids = torch.tensor([0, 2], dtype=torch.long)

ARGS = {
    "data": data,
    "segment_ids": segment_ids,
    "num_segments": num_segments,
}
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, 4) — shape (3, 4) 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
EGNN_vel Not yet run
unverified (harvested, no recorded run)
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("47943b51d6836676")
How it ran

no invocation recorded.

E_GCL_vel Not yet run
unverified (harvested, no recorded run)
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("388c90e0d9d59adf")
How it ran

no invocation recorded.

GCL_basic Not yet run
unverified (harvested, no recorded run)
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("e64a2f01c8da499b")
How it ran

no invocation recorded.

GMN Not yet run
unverified (harvested, no recorded run)
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("0f747d65298ebe83")
How it ran

no invocation recorded.

NCGNN Not yet run
unverified (harvested, no recorded run)
zjukg/ncgnn/spatial_graph/models/ncgnn.py
code served (permissive licence) · get_code("58c8bdf21422239c")
How it ran

no invocation recorded.

evaluate_accuracy Not yet run
unverified (harvested, no recorded run)
zjukg/ncgnn/EqMotion/main_nbody_reasoning.py
code served (permissive licence) · get_code("016b1e334d358460")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 4 later) and 16 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
unsorted_segment_mean
brick of this paper's assembly: helper
20 other papers
8 dated earlier, 11 later, 1 same year, order not determinable · 1 only as an assembly brick
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
2102.09844 (2021-02)
E(n) Equivariant Graph Neural Networks
2110.14811 (2021-10)
SE(3) Equivariant Graph Neural Networks with Complete Local Frames
and 17 more not named here
unsorted_segment_sum
brick of this paper's assembly: helper
19 other papers
9 dated earlier, 1 the same month, 8 later, 1 same year, order not determinable · 2 only as an assembly brick
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.02547 (2019-06)
Combining Generative and Discriminative Models for Hybrid Inference
2102.09844 (2021-02)
E(n) Equivariant Graph Neural Networks
and 16 more not named here
get_velocity_attr 5 other papers
1 dated earlier, 4 later
2203.06442 (2022-03)
Equivariant Graph Mechanics Networks with Constraints
2309.16342 (2023-09)
LagrangeBench: A Lagrangian Fluid Mechanics Benchmarking Suite
2401.11037 (2024-01)
Equivariant Graph Neural Operator for Modeling 3D Dynamics
and 2 more not named here
lr_decay 3 other papers
3 later
2308.08942 (2023-08)
Auxiliary Tasks Benefit 3D Skeleton-based Human Motion Prediction
2410.13027 (2024-10)
Geometric Trajectory Diffusion Models
2503.17267 (2025-03)
Physical Plausibility-aware Trajectory Prediction via Locomotion Embodiment

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

Reasoning system dynamics is one of the most important analytical approaches for many scientific studies. With the initial state of a system as input, the recent graph neural networks (GNNs)-based methods are capable of predicting the future state distant in time with high accuracy. Although these methods have diverse designs in modeling the coordinates and interacting forces of the system, we show that they actually share a common paradigm that learns the integration of the velocity over the interval between the initial and terminal coordinates. However, their integrand is constant w.r.t. time. Inspired by this observation, we propose a new approach to predict the integration based on several velocity estimations with Newton-Cotes formulas and prove its effectiveness theoretically. Extensive experiments on several benchmarks empirically demonstrate consistent and significant improvement compared with the state-of-the-art methods.

For agents

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

get_harvested_code_for_paper("2305.14642")
get_code_for_paper("2305.14642")
have("2305.14642")

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

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

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

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

Connect an agent — have() is free.