SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.11588 · NeurIPS · 2022

Learning Articulated Rigid Body Dynamics with Lagrangian Graph Neural Network

Sayan Ranu, Ravinder Bhattoo, N Krishnan

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 2 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/2209.11588.json · badge: /api/ran/2209.11588.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
m3rg-iitd/rigid_body_dynamics_graph canonical (classifier label)
classifier basis: classifier_2025
3 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
SquarePlus Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from M3RG-IITD/benchmarking_graph
pointer only; the stored copy get_code serves, from M3RG-IITD/benchmarking_graph, is pointer only (licence: NOASSERTION) · get_code("5549bd0c9f053842")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. A run is recorded.

forward_pass Ran
ran; our contract draft was wrong, not the code
m3rg-iitd/rigid_body_dynamics_graph/src/lnn.py
code served (permissive licence) · get_code("c2660facd7797ec1")
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 ArrayImpl, 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 jax.numpy as jnp
from jax import random

# Set seed for reproducibility
key = random.PRNGKey(0)

# Define small test parameters
# params should be a list of (weight, bias) tuples for each layer
# Let's create a 2-layer network: input_dim=4 -> hidden_dim=3 -> output_dim=2

# Layer 1: 4 -> 3
w1 = jnp.ones((3, 4))
b1 = jnp.zeros(3)

# Layer 2: 3 -> 2
w2 = jnp.ones((2, 3))
b2 = jnp.zeros(2)

params = [
    (w1, b1),
    (w2, b2)
]

# Input sample: shape (4,)
x = jnp.array([1.0, 2.0, 3.0, 4.0])

# Define activation function (using the provided SquarePlus)
def SquarePlus(x):
    return 0.5 * (x + jnp.sqrt(x**2 + 4.0))

ARGS = {
    "params": params,
    "x": x,
    "activation_fn": SquarePlus
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
initialize_mlp Ran
ran; our contract draft was wrong, not the code
m3rg-iitd/rigid_body_dynamics_graph/src/models.py
code served (permissive licence) · get_code("d272330ee11ef862")
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 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 jax
import jax.numpy as jnp
from jax import random

# Create a JAX random key
key = random.PRNGKey(0)

# Define sizes for the MLP layers
# Using distinct sizes: 5 -> 3 -> 2 (input -> hidden -> output)
sizes = [5, 3, 2]

# Define affine parameter - can be a list or single value
affine = [False, True]

# Define scale parameter
scale = 0.01

ARGS = {
    "sizes": sizes,
    "key": key,
    "affine": affine,
    "scale": scale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax — 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
layer Ran
ran, honoured the contract we drafted
m3rg-iitd/rigid_body_dynamics_graph/src/lnn.py
code served (permissive licence) · get_code("218440470f3ee0d8")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

# Create parameters for the layer
# params[0] is a weight matrix, params[1] is a bias vector
# For a single sample input of dimension 4, we need a weight matrix of shape (output_dim, input_dim)
# Let's use output_dim=3, input_dim=4

weight_matrix = jnp.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.5, 0.6, 0.7, 0.8],
    [0.9, 1.0, 1.1, 1.2]
], dtype=jnp.float32)

bias_vector = jnp.array([0.1, 0.2, 0.3], dtype=jnp.float32)

params = [weight_matrix, bias_vector]

# Create a single sample input of dimension 4
x = jnp.array([1.0, 2.0, 3.0, 4.0], dtype=jnp.float32)

ARGS = {
    "params": params,
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
LNN Not yet run
unverified (harvested, no recorded run)
m3rg-iitd/rigid_body_dynamics_graph/src/lnn.py
code served (permissive licence) · get_code("f732b52feb01d5a5")
How it ran

no invocation recorded.

ReLU Not yet run
unverified (harvested, no recorded run)
m3rg-iitd/rigid_body_dynamics_graph/src/models.py
code served (permissive licence) · get_code("86a60d7eb39f2e3d")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

SquarePlus Not yet run
unverified (harvested, no recorded run)
m3rg-iitd/rigid_body_dynamics_graph/src/models.py
code served (permissive licence) · get_code("6c259a677bed3680")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 3 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
ReLU 1 other paper
1 later
2211.05520 (2022-11)
Unravelling the Performance of Physics-informed Graph Neural Networks for Dynamical Systems
SquarePlus
brick of this paper's assembly: helper
1 other paper
1 later
2211.05520 (2022-11)
Unravelling the Performance of Physics-informed Graph Neural Networks for Dynamical Systems
initialize_mlp 1 other paper
1 later
2211.05520 (2022-11)
Unravelling the Performance of Physics-informed Graph Neural Networks for Dynamical Systems

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

Lagrangian and Hamiltonian neural networks (LNNs and HNNs, respectively) encode strong inductive biases that allow them to outperform other models of physical systems significantly. However, these models have, thus far, mostly been limited to simple systems such as pendulums and springs or a single rigid body such as a gyroscope or a rigid rotor. Here, we present a Lagrangian graph neural network (LGNN) that can learn the dynamics of articulated rigid bodies by exploiting their topology. We demonstrate the performance of LGNN by learning the dynamics of ropes, chains, and trusses with the bars modeled as rigid bodies. LGNN also exhibits generalizability-LGNN trained on chains with a few segments exhibits generalizability to simulate a chain with large number of links and arbitrary link length. We also show that the LGNN can simulate unseen hybrid systems including bars and chains, on which they have not been trained on. Specifically, we show that the LGNN can be used to model the dynamics of complex real-world structures such as the stability of tensegrity structures. Finally, we discuss the non-diagonal nature of the mass matrix and its ability to generalize in complex systems.

For agents

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

get_harvested_code_for_paper("2209.11588")
get_code_for_paper("2209.11588")
have("2209.11588")

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

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

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

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

Connect an agent — have() is free.