SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.05573 · 2023

ODEFormer: Symbolic Regression of Dynamical Systems with Transformers

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 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/2310.05573.json · badge: /api/ran/2310.05573.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
sdascoli/odeformer canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_metrics Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sdascoli/odeformer/odeformer/metrics.py
code served (permissive licence) · get_code("05834022280c159d")
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 defaultdict. 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 numpy as np
import sympy
from sympy import symbols, Add

# Create sample predicted and true arrays
# The function checks len(true.shape) < 3, so we can use 2D or 3D arrays
predicted = np.array([[1.0, 2.0, 3.0, 4.0], [1.1, 2.1, 3.1, 4.1]])
true = np.array([[1.0, 2.0, 3.0, 4.0], [1.0, 2.0, 3.0, 4.0]])

# Create sample predicted_tree - can be None or a sympy expression
x = symbols('x')
predicted_tree = [Add(x, 1), Add(x, 2)]

# Create sample tree - can be None or a sympy expression
tree = [Add(x, 1), Add(x, 1)]

# Create metrics string
metrics = 'r2,is_valid,is_valid_tree'

ARGS = {
    'predicted': predicted,
    'true': true,
    'predicted_tree': predicted_tree,
    'tree': tree,
    'metrics': metrics
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, regex, scipy, sklearn, sympy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
create_logger Ran
ran; our contract draft was wrong, not the code
sdascoli/odeformer/odeformer/logger.py
code served (permissive licence) · get_code("8ad3516cd9a65027")
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 RootLogger. 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 logging
import time
import tempfile
import os

class LogFormatter:

    def __init__(self):
        self.start_time = time.time()

    def format(self, record):
        elapsed_seconds = round(record.created - self.start_time)
        prefix = '%s - %s - %s' % (record.levelname, time.strftime('%x %X'), timedelta(seconds=elapsed_seconds))
        message = record.getMessage()
        message = message.replace('\n', '\n' + ' ' * (len(prefix) + 3))
        return '%s - %s' % (prefix, message) if message else ''

def create_logger(filepath, rank):
    """
    Create a logger.
    Use a different log file for each process.
    """
    log_formatter = LogFormatter()
    if filepath is not None:
        if rank > 0:
            filepath = '%s-%i' % (filepath, rank)
        file_handler = logging.FileHandler(filepath, 'a')
        file_handler.setLevel(logging.DEBUG)
        file_handler.setFormatter(log_formatter)
    console_handler = logging.StreamHandler()
    console_handler.setLevel(logging.INFO)
    console_handler.setFormatter(log_formatter)
    logger = logging.getLogger()
    logger.handlers = []
    logger.setLevel(logging.DEBUG)
    logger.propagate = False
    if filepath is not None:
        logger.addHandler(file_handler)
    logger.addHandler(console_handler)
    logger.propagate = False

    def reset_time():
        log_formatter.start_time = time.time()
    logger.reset_time = reset_time
    return logger

from datetime import timedelta

# Create a temporary file path for logging
temp_dir = tempfile.gettempdir()
log_filepath = os.path.join(temp_dir, "test_logger.log")

ARGS = {
    "filepath": log_filepath,
    "rank": 0
}
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 RootLogger — a RootLogger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RootLogger 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
exchange_node_values Ran
ran; our contract draft was wrong, not the code
sdascoli/odeformer/odeformer/model/sklearn_wrapper.py
code served (permissive licence) · get_code("b6632272c07541d0")
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 TreeNode. 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 copy
import torch

torch.manual_seed(0)

class TreeNode:
    """A simple tree node class with replace_node_value method"""
    def __init__(self, value):
        self.value = value
        self.children = []
    
    def replace_node_value(self, old, new):
        """Replace all nodes with value 'old' with value 'new'"""
        if self.value == old:
            self.value = new
        for child in self.children:
            child.replace_node_value(old, new)
    
    def add_child(self, child):
        self.children.append(child)

# Build a simple tree structure
root = TreeNode("a")
child1 = TreeNode("b")
child2 = TreeNode("a")
child3 = TreeNode("c")

root.add_child(child1)
root.add_child(child2)
child1.add_child(child3)

# Create mapping of old values to new values
replacement_dict = {
    "a": "x",
    "b": "y",
    "c": "z"
}

ARGS = {
    "tree": root,
    "dico": replacement_dict
}
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 TreeNode — a TreeNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TreeNode 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
get_complexity Ran
ran, honoured the contract we drafted
sdascoli/odeformer/odeformer/metrics.py
code served (permissive licence) · get_code("8387240b6af1f632")
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 int, ndim 0, dtype family int, 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 sympy
from sympy import symbols, Add, Mul, Pow, sin, cos

# Create a symbolic expression to pass to get_complexity
x = symbols('x')
y = symbols('y')

# Build a moderately complex expression
# This will have multiple nodes in the expression tree
expr = Add(Mul(x, y), Pow(x, 2), sin(x), cos(y))

ARGS = {
    'expr': expr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sympy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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_masks Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sdascoli/odeformer/odeformer/model/transformer.py
code served (permissive licence) · get_code("b2470f4f0c09db41")
How it ran

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

import torch

torch.manual_seed(0)

# Parameters for get_masks function:
# - slen: sequence length (int)
# - lengths: tensor of actual lengths for each sequence in batch
# - causal: boolean flag for causal masking

batch_size = 2
slen = 5

# Create lengths tensor where each element is <= slen
lengths = torch.tensor([3, 5], dtype=torch.long)

# Test with causal=True to exercise both branches
causal = True

ARGS = {
    'slen': slen,
    'lengths': lengths,
    'causal': causal
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — 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
tokenize_equation Ran
ran; our contract draft was wrong, not the code
sdascoli/odeformer/odeformer/metrics.py
code served (permissive licence) · get_code("81246497b9767969")
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, ndim 1, 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 regex

ARGS = {
    'eq': 'x + 2.5 * y - 3.14e-2 / (z + 1)',
    'tokens_to_ignore': '|,',
    'debug': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
top_k_top_p_filtering Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sdascoli/odeformer/odeformer/model/transformer.py
code served (permissive licence) · get_code("9ef29a7930f6956c")
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 a small logits tensor: batch_size=2, vocab_size=4
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits,
    "top_k": 2,
    "top_p": 0.9,
    "filter_value": -float('Inf'),
    "min_tokens_to_keep": 1,
}
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
get_infinite_relative_error Not yet run
unverified (harvested, no recorded run)
sdascoli/odeformer/odeformer/regressors.py
code served (permissive licence) · get_code("01cbe9c6ae58100c")
How it ran

no invocation recorded.

get_optimizer Not yet run
unverified (harvested, no recorded run)
sdascoli/odeformer/odeformer/optim.py
code served (permissive licence) · get_code("938c1307aa7da20e")
How it ran

no invocation recorded.

order_data Not yet run
unverified (harvested, no recorded run)
sdascoli/odeformer/odeformer/regressors.py
code served (permissive licence) · get_code("91a6b94673648495")
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, 5 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 5 later) and 5 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
get_masks 8 other papers
6 dated earlier, 2 later · 1 only as an assembly brick
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
2010.03017 (2020-10)
On Negative Interference in Multilingual Models: Findings and A Meta-Learning Treatment
2110.03501 (2021-10)
Pretrained Language Models are Symbolic Mathematics Solvers too!
and 5 more not named here
top_k_top_p_filtering 4 other papers
2 dated earlier, 2 later
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
2305.00909 (2023-05)
Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generation
2025.emnlp-main.1418 (2025 (year only))
Synth-SBDH: A Synthetic Dataset of Social and Behavioral Determinants of Health for Clinical Text
and 1 more not named here
get_infinite_relative_error 1 other paper
1 later
2404.11341 (2024-04)
The Causal Chambers: Real Physical Systems as a Testbed for AI Methodology
get_optimizer 1 other paper
1 later
2404.11341 (2024-04)
The Causal Chambers: Real Physical Systems as a Testbed for AI Methodology
order_data 1 other paper
1 later
2404.11341 (2024-04)
The Causal Chambers: Real Physical Systems as a Testbed for AI Methodology

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

We introduce ODEFormer, the first transformer able to infer multidimensional ordinary differential equation (ODE) systems in symbolic form from the observation of a single solution trajectory. We perform extensive evaluations on two datasets: (i) the existing "Strogatz" dataset featuring two-dimensional systems; (ii) ODEBench, a collection of one- to four-dimensional systems that we carefully curated from the literature to provide a more holistic benchmark. ODEFormer consistently outperforms existing methods while displaying substantially improved robustness to noisy and irregularly sampled observations, as well as faster inference. We release our code, model and benchmark dataset publicly.

For agents

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

get_harvested_code_for_paper("2310.05573")
get_code_for_paper("2310.05573")
have("2310.05573")

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

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

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

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

Connect an agent — have() is free.