SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.13431 · 2024

Improving Out-of-Distribution Generalization of Trajectory Prediction for Autonomous Driving via Polynomial Representations

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2407.13431.json · badge: /api/ran/2407.13431.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
continental/everything-polynomial canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
M_matrix Ran
ran, honoured the contract we drafted
continental/everything-polynomial/Argo2/utils_common/dataloader_utils.py
code served (permissive licence) · get_code("914bff438497ae3f")
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 (4, 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 numpy as np
from scipy.special import binom

def M_matrix(n):
    """
    A matrix that transfers monomial basis function to berstein basis function
    param n: the order of polynomial
    """
    M = np.zeros([n + 1, n + 1], dtype=np.float32)
    for i in range(1, n + 2):
        for j in range(1, i + 1):
            M[i - 1, j - 1] = binom(n, j - 1) * binom(n + 1 - j, i - j) * (-1) ** ((i + j) % 2)
    return M

ARGS = {
    "n": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (4, 4) — shape (4, 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
build_ego_observation_noise_covariance Ran
ran, honoured the contract we drafted
continental/everything-polynomial/Argo2/utils_argo2/tracking_utils.py
code served (permissive licence) · get_code("afe3779c7e07acb7")
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 (2, 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

# Construct prior_data with the required structure
prior_data = {
    'B_list': [
        {
            'B_diag': np.array([1.5]),
            'B_by_diag': np.array([0.3])
        },
        {
            'B_diag': np.array([2.1]),
            'B_by_diag': np.array([0.5])
        },
        {
            'B_diag': np.array([1.8]),
            'B_by_diag': np.array([0.4])
        }
    ]
}

ARGS = {
    'degree': 2,
    'prior_data': prior_data
}
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 (2, 2) — shape (2, 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
build_obj_observation_noise_covariance Ran
ran; our contract draft was wrong, not the code
continental/everything-polynomial/Argo2/utils_argo2/tracking_utils.py
code served (permissive licence) · get_code("8b8741ce00db8928")
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 (2, 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

# Build prior_data structure with nested dictionaries containing required fields
prior_data = {
    'B_list': [
        {
            'B_d': np.array([[1.0], [0.5], [0.1]]),  # beta0, beta1, beta2
            'B_theta': np.array([0.2]),  # sigma_alpha
            'B_const': np.array([0.05])  # sigma_c
        },
        {
            'B_d': np.array([[0.8], [0.4], [0.08]]),
            'B_theta': np.array([0.18]),
            'B_const': np.array([0.04])
        },
        {
            'B_d': np.array([[1.2], [0.6], [0.12]]),
            'B_theta': np.array([0.22]),
            'B_const': np.array([0.06])
        }
    ]
}

# Create test positions and heading
ego_pos = np.array([0.0, 0.0])
obj_pos = np.array([5.0, 3.0])
ego_heading = 0.5  # radians
degree = 1

ARGS = {
    'ego_pos': ego_pos,
    'ego_heading': ego_heading,
    'obj_pos': obj_pos,
    'degree': degree,
    'prior_data': prior_data
}
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 (2, 2) — shape (2, 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
flip_indecies_cov Ran
ran, honoured the contract we drafted
continental/everything-polynomial/Argo2/utils_common/dataloader_utils.py
code served (permissive licence) · get_code("4c0dfd1433f71dbc")
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 2, 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 numpy as np

def flip_indecies_cov(D):
    assert D % 2 == 0
    r, c = ([], [])
    for d in range(D):
        if d % 2 != 0:
            c_new = np.arange(0, D - 1, 2).tolist()
            c = c + c_new
            r = r + [d] * len(c_new)
        else:
            c_new = np.arange(1, D, 2).tolist()
            c = c + c_new
            r = r + [d] * len(c_new)
    return (r, c)

ARGS = {
    "D": 4
}
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 tuple, ndim 2, 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
generate_file_list_dataset Ran
ran; our contract draft was wrong, not the code
continental/everything-polynomial/Argo2/utils_common/dataloader_utils.py
code served (permissive licence) · get_code("a2aeeabe379e9e46")
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 _TensorSliceDataset. 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 os
import tempfile
import tensorflow as tf

# Create a temporary directory structure with mock files
temp_dir = tempfile.mkdtemp()

# Create subdirectories and mock files
os.makedirs(os.path.join(temp_dir, 'scenario_1'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'scenario_2'), exist_ok=True)

# Create mock track and map files
with open(os.path.join(temp_dir, 'scenario_1', 'track_001.txt'), 'w') as f:
    f.write('track data 1')
with open(os.path.join(temp_dir, 'scenario_1', 'map_001.txt'), 'w') as f:
    f.write('map data 1')
with open(os.path.join(temp_dir, 'scenario_2', 'track_002.txt'), 'w') as f:
    f.write('track data 2')
with open(os.path.join(temp_dir, 'scenario_2', 'map_002.txt'), 'w') as f:
    f.write('map data 2')

ARGS = {
    'path_list': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _TensorSliceDataset — a _TensorSliceDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _TensorSliceDataset 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_prior Ran
ran, honoured the contract we drafted
continental/everything-polynomial/Argo2/utils_argo2/tracking_utils.py
code served (permissive licence) · get_code("f6d316ba42b26812")
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 numpy as np
from scipy.special import binom

# Construct prior_data with A_list containing matrices for different degrees
# The function accesses prior_data['A_list'][degree - 1]
# For degree=2, we need A_list[1] to exist
# A_list[i] should be a (2*degree, 2*degree) matrix based on how it's used

degree = 2
timescale = 1.5
spacedim = 2

# Build A_list with appropriate matrix dimensions
# For degree=2, we need 2*degree = 4, so A_list[1] should be 4x4
A_list = [
    np.random.randn(2, 2),  # A_list[0] for degree=1
    np.random.randn(4, 4),  # A_list[1] for degree=2
]

prior_data = {
    'A_list': A_list
}

ARGS = {
    'degree': degree,
    'timescale': timescale,
    'prior_data': prior_data,
    'spacedim': spacedim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
list_intersection Ran
ran; our contract draft was wrong, not the code
continental/everything-polynomial/Argo2/utils_common/helper_utils.py
code served (permissive licence) · get_code("1b904d32fef1d323")
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 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
import numpy as np

torch.manual_seed(0)

# Construct arguments for list_intersection
# The function takes two lists and returns their intersection

l1 = [1, 2, 3, 4, 5]
l2 = [3, 4, 5, 6, 7]

ARGS = {
    "l1": l1,
    "l2": l2,
}
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, ndim 1, dtype family int — 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
list_slice Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
continental/everything-polynomial/Argo2/utils_common/helper_utils.py
code served (permissive licence) · get_code("9f8517fced9e4f64")
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 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
import torch.nn as nn

# Construct valid arguments for list_slice function
# The function takes a list and indices, returning elements at those indices

ARGS = {
    'l': [10, 20, 30, 40, 50],
    'indicies': [0, 2, 4, 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 list, ndim 1, dtype family int — 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
waymo_protobuf_to_dataframe Ran
ran; our contract draft was wrong, not the code
continental/everything-polynomial/Argo2/utils_common/helper_utils.py
code served (permissive licence) · get_code("285b2dc37b192ca1")
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 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 numpy as np
import pandas as pd

class State:
    def __init__(self, valid, center_x, center_y, heading, velocity_x, velocity_y):
        self.valid = valid
        self.center_x = center_x
        self.center_y = center_y
        self.heading = heading
        self.velocity_x = velocity_x
        self.velocity_y = velocity_y

class Track:
    def __init__(self, track_id, object_type, states):
        self.id = track_id
        self.object_type = object_type
        self.states = states

class TracksToPredict:
    def __init__(self, track_index):
        self.track_index = track_index

class Scenario:
    def __init__(self, tracks, sdc_track_index, tracks_to_predict):
        self.tracks = tracks
        self.sdc_track_index = sdc_track_index
        self.tracks_to_predict = tracks_to_predict

# Create scenario with enough data for the function to work
# Need at least 2 tracks: one for AV (sdc_track_index=0) and one for agent (to predict)
# Each track needs 42 valid states (based on the check for observed_steps == 42)

hist_len = 10
min_obs_len = 5

# Create AV track (track 0, sdc)
av_states = []
for i in range(50):
    state = State(
        valid=True,
        center_x=float(i),
        center_y=float(i * 2),
        heading=0.5,
        velocity_x=1.0,
        velocity_y=2.0
    )
    av_states.append(state)

av_track = Track(track_id=100, object_type=1, states=av_states)

# Create agent track (track 1, to predict)
agent_states = []
for i in range(50):
    state = State(
        valid=True,
        center_x=float(i + 10),
        center_y=float(i * 3),
        heading=0.7,
        velocity_x=1.5,
        velocity_y=2.5
    )
    agent_states.append(state)

agent_track = Track(track_id=200, object_type=2, states=agent_states)

# Create scenario
tracks = [av_track, agent_track]
sdc_track_index = 0
tracks_to_predict = [TracksToPredict(track_index=1)]

scenario = Scenario(
    tracks=tracks,
    sdc_track_index=sdc_track_index,
    tracks_to_predict=tracks_to_predict
)

ARGS = {
    'scenario': scenario,
    'hist_len': hist_len,
    'min_obs_len': min_obs_len
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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 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

Also present in other papers' code

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

Robustness against Out-of-Distribution (OoD) samples is a key performance indicator of a trajectory prediction model. However, the development and ranking of state-of-the-art (SotA) models are driven by their In-Distribution (ID) performance on individual competition datasets. We present an OoD testing protocol that homogenizes datasets and prediction tasks across two large-scale motion datasets. We introduce a novel prediction algorithm based on polynomial representations for agent trajectory and road geometry on both the input and output sides of the model. With a much smaller model size, training effort, and inference time, we reach near SotA performance for ID testing and significantly improve robustness in OoD testing. Within our OoD testing protocol, we further study two augmentation strategies of SotA models and their effects on model generalization. Highlighting the contrast between ID and OoD performance, we suggest adding OoD testing to the evaluation criteria of trajectory prediction models.

For agents

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

get_harvested_code_for_paper("2407.13431")
get_code_for_paper("2407.13431")
have("2407.13431")

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

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

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

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

Connect an agent — have() is free.