SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.01894 · 2021

Combining Physics and Deep Learning to learn Continuous-Time Dynamics Models

arXiv · PDF · Open in the Atlas

Code that ran

6 of 15 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 6 have no contract verdict; 0 failures of our instrument; 9 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/2110.01894.json · badge: /api/ran/2110.01894.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
milutter/deep_lagrangian_networks canonical (classifier label)
classifier basis not recorded on the link
6 ran · 9 no recorded run
FunctionStatusWhere it lives
dynamics_model Ran
ran on a synthesized input
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_Black_Box_model.py
code served (permissive licence) · get_code("562dbed30a1e11c1")
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 jax
import jax.numpy as jnp

# black_box_model is called as: black_box_model(params, key, q, qd, qdd, tau)
# It returns (qdd_pred, tau_pred)
class BlackBoxModel:
    def __call__(self, params, key, q, qd, qdd, tau):
        n_samples = q.shape[0]
        n_dof = q.shape[1]
        # Return dummy predictions with correct shapes
        qdd_pred = jnp.zeros((n_samples, n_dof))
        tau_pred = jnp.zeros((n_samples, n_dof))
        return qdd_pred, tau_pred

# Set up tiny data: batch_size=2, n_dof=4
n_samples = 2
n_dof = 4

# Create dummy params (can be any pytree structure)
params = {"w": jnp.ones((4, 4))}

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

# Create input arrays
q = jnp.ones((n_samples, n_dof))
qd = jnp.ones((n_samples, n_dof))
qdd = jnp.ones((n_samples, n_dof))
tau = jnp.ones((n_samples, n_dof))

# Create black_box_model instance
black_box_model = BlackBoxModel()

ARGS = {
    "params": params,
    "key": key,
    "q": q,
    "qd": qd,
    "qdd": qdd,
    "tau": tau,
    "black_box_model": black_box_model,
    "n_dof": n_dof
}
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 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
forward_model Ran
ran on a synthesized input
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_Black_Box_model.py
code served (permissive licence) · get_code("65b06435097a5acb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import jax
import jax.numpy as jnp

torch.manual_seed(0)

# Build a minimal black_box_model that accepts (params, key, q, qd, zeros, tau)
# and returns (qdd_pred, something_else)
class BlackBoxModel(nn.Module):
    def __init__(self, n_dof):
        super().__init__()
        self.n_dof = n_dof
    
    def forward(self, params, key, q, qd, qd_zeros, tau):
        # params, key are JAX-compatible, q/qd/tau are tensors
        # Return predicted accelerations and a dummy value
        batch_size = q.shape[0]
        qdd_pred = torch.randn(batch_size, self.n_dof)
        dummy = None
        return qdd_pred, dummy

n_dof = 4
black_box_model = BlackBoxModel(n_dof)

# Set up JAX key
key = jax.random.PRNGKey(0)

# Set up params (JAX pytree, can be a simple dict)
params = {"weights": jnp.array([0.1, 0.2, 0.3, 0.4])}

# Set up small tensors: batch size 2, n_dof dimensions
batch_size = 2
q = torch.randn(batch_size, n_dof)
qd = torch.randn(batch_size, n_dof)
tau = torch.randn(batch_size, n_dof)

ARGS = {
    "params": params,
    "key": key,
    "q": q,
    "qd": qd,
    "tau": tau,
    "black_box_model": black_box_model,
    "n_dof": n_dof,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
init_env Ran
ran on a synthesized input
milutter/deep_lagrangian_networks/deep_lagrangian_networks/utils.py
code served (permissive licence) · get_code("01efd7bb4e843c0e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family 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 numpy as np
import torch

class Args:
    def __init__(self):
        self.s = [42]  # seed
        self.i = [0]   # cuda_id
        self.c = [0]   # cuda_flag (False when converted to bool, or 0)
        self.r = [0]   # render
        self.l = [0]   # load_model
        self.m = [0]   # save_model

ARGS = {'args': Args()}
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 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
parition_params Ran
ran on a synthesized input
milutter/deep_lagrangian_networks/deep_lagrangian_networks/utils.py
code served (permissive licence) · get_code("a7b80c634651d1c5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function checks if the first part of module_name (split by '/') equals key
# So we need:
# - module_name: a string with '/' separators
# - name: a parameter name (string)
# - value: some value (can be anything since it's not used in the function)
# - key: a string to compare against

ARGS = {
    "module_name": "encoder/layer1/attention",
    "name": "weight",
    "value": torch.randn(4, 3),
    "key": "encoder"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
running_mean Ran
ran on a synthesized input
milutter/deep_lagrangian_networks/figure_forward_model.py
code served (permissive licence) · get_code("e213a81b3bb98d9d")
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 (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 numpy as np

# Analyze the function:
# - x: used with x[0] and passed to np.concatenate, so it needs to be array-like
# - n: used as integer for ones() shape and for slicing operations
# - The function computes a running mean over windows of size n

# Create a small 1D array for x
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0])

# Create a small integer for window size
n = 2

ARGS = {
    "x": x,
    "n": n,
}
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 (5,) — shape (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
warning_on_one_line Ran
ran on a synthesized input
milutter/deep_lagrangian_networks/deep_lagrangian_networks/replay_memory.py
code served (permissive licence) · get_code("c515527842ec23ad")
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 str. 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 warnings

ARGS = {
    'message': 'This is a warning message',
    'category': UserWarning,
    'filename': 'test_file.py',
    'lineno': 42,
    'file': None,
    'line': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
blackbox_hamiltonian_fn Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_HNN_model.py
code served (permissive licence) · get_code("2667e258f0cdc0e2")
How it ran

no invocation recorded.

dynamics_network Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_Black_Box_model.py
code served (permissive licence) · get_code("5dfc2a678c2620d3")
How it ran

no invocation recorded.

explicit_euler Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_integrator.py
code served (permissive licence) · get_code("0fe3cac41b65645a")
How it ran

no invocation recorded.

kinetic_energy_fn Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_DeLaN_model.py
code served (permissive licence) · get_code("c155e05380e491f1")
How it ran

no invocation recorded.

load_dataset Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/utils.py
code served (permissive licence) · get_code("b844b4778c786ead")
How it ran

no invocation recorded.

mass_matrix_fn Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_DeLaN_model.py
code served (permissive licence) · get_code("69ace0bd6b917694")
How it ran

no invocation recorded.

potential_energy_fn Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_DeLaN_model.py
code served (permissive licence) · get_code("40239c8a6c8e8ebf")
How it ran

no invocation recorded.

runge_kutta_4 Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_integrator.py
code served (permissive licence) · get_code("d679173a94867a01")
How it ran

no invocation recorded.

symplectic_euler Not yet run
unverified (harvested, no recorded run)
milutter/deep_lagrangian_networks/deep_lagrangian_networks/jax_integrator.py
code served (permissive licence) · get_code("e0b816555f4359ab")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 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 15 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-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

Deep learning has been widely used within learning algorithms for robotics. One disadvantage of deep networks is that these networks are black-box representations. Therefore, the learned approximations ignore the existing knowledge of physics or robotics. Especially for learning dynamics models, these black-box models are not desirable as the underlying principles are well understood and the standard deep networks can learn dynamics that violate these principles. To learn dynamics models with deep networks that guarantee physically plausible dynamics, we introduce physics-inspired deep networks that combine first principles from physics with deep learning. We incorporate Lagrangian mechanics within the model learning such that all approximated models adhere to the laws of physics and conserve energy. Deep Lagrangian Networks (DeLaN) parametrize the system energy using two networks. The parameters are obtained by minimizing the squared residual of the Euler-Lagrange differential equation. Therefore, the resulting model does not require specific knowledge of the individual system, is interpretable, and can be used as a forward, inverse, and energy model. Previously these properties were only obtained when using system identification techniques that require knowledge of the kinematic structure. We apply DeLaN to learning dynamics models and apply these models to control simulated and physical rigid body systems. The results show that the proposed approach obtains dynamics models that can be applied to physical systems for real-time control. Compared to standard deep networks, the physics-inspired models learn better models and capture the underlying structure of the dynamics.

For agents

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

get_harvested_code_for_paper("2110.01894")
get_code_for_paper("2110.01894")
have("2110.01894")

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

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

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

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

Connect an agent — have() is free.