SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.08635 · 2023

Generative Causal Representation Learning for Out-of-Distribution Motion Forecasting

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 2 failures of our instrument; 2 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/2302.08635.json · badge: /api/ran/2302.08635.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
sshirahmad/GCRL community (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
FunctionStatusWhere it lives
erm_loss Ran
ran on a synthesized input
sshirahmad/GCRL/utils.py
code served (permissive licence) · get_code("bd1403cc98b0ff9d")
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 1, dtype family float, shape (1,) as a later run recorded it. 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, 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)

# l2_loss_rel: a tensor that will be indexed with torch.narrow along dimension 0
# It needs to have enough elements to cover the ranges in seq_start_end
# Shape: (total_sequences, feature_dim) where total_sequences >= max(end) in seq_start_end
l2_loss_rel = torch.randn(10, 4)

# seq_start_end: an object with a .data attribute that is iterable
# Each element is a pair (start, end) defining ranges
# We'll create a simple object that mimics this structure
class SeqStartEnd:
    def __init__(self, data):
        self.data = data

seq_start_end = SeqStartEnd([
    (0, 3),
    (3, 7),
    (7, 10)
])

ARGS = {
    "l2_loss_rel": l2_loss_rel,
    "seq_start_end": seq_start_end
}
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 1, dtype family float, shape (1,) — shape (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_dset_path Ran
ran on a synthesized input
sshirahmad/GCRL/utils.py
code served (permissive licence) · get_code("b0d3a153c03cf535")
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 os

def get_dset_path(dset_name, dset_type):
    _dir = os.path.dirname(__file__)
    return os.path.join(_dir, 'datasets', dset_name, dset_type)

ARGS = {
    'dset_name': 'cifar10',
    'dset_type': 'train'
}
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
get_mean_std_over_seeds Ran
ran on a synthesized input
sshirahmad/GCRL/visualize.py
code served (permissive licence) · get_code("e3ed4dc5bbea0947")
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

# The function takes two array-like parameters (ADE_seeds, FDE_seeds)
# and computes mean and std over them using np.mean() and np.std()
# The ds and model parameters are not used in the function body

# Create sample seed data - lists of ADE and FDE values across different seeds
ADE_seeds = [0.5, 0.6, 0.7, 0.55]
FDE_seeds = [1.2, 1.3, 1.1, 1.25]

ARGS = {
    'ADE_seeds': ADE_seeds,
    'FDE_seeds': FDE_seeds,
    'ds': 0.6,
    'model': 'IM'
}
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 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
read_file Ran
ran, honoured the contract we drafted
sshirahmad/GCRL/trajectories.py
pointer only (licence: MIT); the stored copy get_code serves, from inhwanbae/LMTrajectory, is pointer only (licence: NOASSERTION) · get_code("123c2031d3127cc9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from inhwanbae/LMTrajectory, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

relative_to_abs Ran
ran; our contract draft was wrong, not the code
sshirahmad/GCRL/utils.py
code served (permissive licence) · get_code("d5ab777433781612")
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 3, dtype family float, shape (5, 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 torch

torch.manual_seed(0)

# rel_traj: pytorch tensor of shape (seq_len, batch, 2)
seq_len = 5
batch = 2
rel_traj = torch.randn(seq_len, batch, 2)

# start_pos: pytorch tensor of shape (batch, 2)
start_pos = torch.randn(batch, 2)

ARGS = {
    'rel_traj': rel_traj,
    'start_pos': start_pos
}
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 3, dtype family float, shape (5, 2, 2) — shape (5, 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
seq_collate Ran
ran; our contract draft was wrong, not the code
sshirahmad/GCRL/trajectories.py
code served (permissive licence) · get_code("d3de56755e246898")
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 torch
import numpy as np

torch.manual_seed(0)

# Create sample data for seq_collate
# Each item in data should be a tuple of (obs_seq, fut_seq, obs_seq_rel, fut_seq_rel)
# Format: groups of pedestrians X coord X frame

# First batch item: 2 pedestrians, 2 coordinates, 3 observation frames, 2 future frames
obs_seq_1 = torch.randn(2, 2, 3)  # (num_peds, coords, obs_frames)
fut_seq_1 = torch.randn(2, 2, 2)  # (num_peds, coords, fut_frames)
obs_seq_rel_1 = torch.randn(2, 2, 3)  # (num_peds, coords, obs_frames)
fut_seq_rel_1 = torch.randn(2, 2, 2)  # (num_peds, coords, fut_frames)

# Second batch item: 3 pedestrians, 2 coordinates, 3 observation frames, 2 future frames
obs_seq_2 = torch.randn(3, 2, 3)  # (num_peds, coords, obs_frames)
fut_seq_2 = torch.randn(3, 2, 2)  # (num_peds, coords, fut_frames)
obs_seq_rel_2 = torch.randn(3, 2, 3)  # (num_peds, coords, obs_frames)
fut_seq_rel_2 = torch.randn(3, 2, 2)  # (num_peds, coords, fut_frames)

# Create data list of tuples
data = [
    (obs_seq_1, fut_seq_1, obs_seq_rel_1, fut_seq_rel_1),
    (obs_seq_2, fut_seq_2, obs_seq_rel_2, fut_seq_rel_2),
]

ARGS = {
    'data': data
}
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 — 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
seq_collate_social Ran
ran on a synthesized input
sshirahmad/GCRL/trajectories.py
code served (permissive licence) · get_code("23003035b4c56964")
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 torch
import numpy as np

torch.manual_seed(0)

# Create sample data matching the expected format
# Each item in data is: (obs_seq, fut_seq, obs_seq_rel, fut_seq_rel, augm_data)
# Format: pedestrians X coord X frame

# First group: 2 pedestrians, 2 coords, 3 frames
obs_seq_1 = torch.randn(2, 2, 3)  # 2 peds, 2 coords, 3 frames
fut_seq_1 = torch.randn(2, 2, 4)  # 2 peds, 2 coords, 4 frames
obs_seq_rel_1 = torch.randn(2, 2, 3)
fut_seq_rel_1 = torch.randn(2, 2, 4)
augm_data_1 = torch.randn(2, 2, 5)  # 2 peds, 2 coords, 5 frames

# Second group: 3 pedestrians, 2 coords, 3 frames
obs_seq_2 = torch.randn(3, 2, 3)  # 3 peds, 2 coords, 3 frames
fut_seq_2 = torch.randn(3, 2, 4)  # 3 peds, 2 coords, 4 frames
obs_seq_rel_2 = torch.randn(3, 2, 3)
fut_seq_rel_2 = torch.randn(3, 2, 4)
augm_data_2 = torch.randn(3, 2, 5)  # 3 peds, 2 coords, 5 frames

# Create batch of tuples
data = [
    (obs_seq_1, fut_seq_1, obs_seq_rel_1, fut_seq_rel_1, augm_data_1),
    (obs_seq_2, fut_seq_2, obs_seq_rel_2, fut_seq_rel_2, augm_data_2),
]

ARGS = {
    'data': data
}
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 — 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
cal_ade_fde Not yet run
unverified (harvested, no recorded run)
sshirahmad/GCRL/evaluate_model.py
code served (permissive licence) · get_code("644192cce02c4d9c")
How it ran

no invocation recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
sshirahmad/GCRL/evaluate_model.py
code served (permissive licence) · get_code("db7aa558200112ab")
How it ran

no invocation recorded.

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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 1 later) and 4 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
read_file 2 other papers
1 dated earlier, 1 later
2111.14820 (2021-11)
Towards Robust and Adaptive Motion Forecasting: A Causal Representation Perspective
2403.18447 (2024-03)
Can Language Beat Numerical Regression? Language-Based Multimodal Trajectory Prediction
relative_to_abs 2 other papers
2 dated earlier
2111.14820 (2021-11)
Towards Robust and Adaptive Motion Forecasting: A Causal Representation Perspective
2207.10398 (2022-07)
D2-TPred: Discontinuous Dependency for Trajectory Prediction under Traffic Lights
cal_ade_fde 1 other paper
1 dated earlier
2111.14820 (2021-11)
Towards Robust and Adaptive Motion Forecasting: A Causal Representation Perspective
get_dset_path 1 other paper
1 dated earlier
2111.14820 (2021-11)
Towards Robust and Adaptive Motion Forecasting: A Causal Representation Perspective
seq_collate 1 other paper
1 dated earlier
2111.14820 (2021-11)
Towards Robust and Adaptive Motion Forecasting: A Causal Representation Perspective

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

Conventional supervised learning methods typically assume i.i.d samples and are found to be sensitive to out-of-distribution (OOD) data. We propose Generative Causal Representation Learning (GCRL) which leverages causality to facilitate knowledge transfer under distribution shifts. While we evaluate the effectiveness of our proposed method in human trajectory prediction models, GCRL can be applied to other domains as well. First, we propose a novel causal model that explains the generative factors in motion forecasting datasets using features that are common across all environments and with features that are specific to each environment. Selection variables are used to determine which parts of the model can be directly transferred to a new environment without fine-tuning. Second, we propose an end-to-end variational learning paradigm to learn the causal mechanisms that generate observations from features. GCRL is supported by strong theoretical results that imply identifiability of the causal model under certain assumptions. Experimental results on synthetic and real-world motion forecasting datasets show the robustness and effectiveness of our proposed method for knowledge transfer under zero-shot and low-shot settings by substantially outperforming the prior motion forecasting models on out-of-distribution prediction. Our code is available at https://github.com/sshirahmad/GCRL.

For agents

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

get_harvested_code_for_paper("2302.08635")
get_code_for_paper("2302.08635")
have("2302.08635")

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

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

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

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

Connect an agent — have() is free.