SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2111.01592 · 2021

Trajectory Prediction with Graph-based Dual-scale Context Fusion

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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 10 have no contract verdict; 0 failures of our instrument; 1 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/2111.01592.json · badge: /api/ran/2111.01592.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
hkust-aerial-robotics/dsp canonical (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
FunctionStatusWhere it lives
conv1d Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/network_utils.py
code served (permissive licence) · get_code("daceb448ca90f5e5")
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 Sequential. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'in_channels': 3,
    'out_channels': 16,
    'kernel_size': 5,
    'stride': 1,
    'padding': 2,
    'dilation': 1,
    'apply_bn': True,
    'activation': 'relu'
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
distributed_concat Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/evaluation_ddp.py
code served (permissive licence) · get_code("65ebc73033a5ff60")
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 (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 torch
import torch.distributed as dist
from unittest.mock import MagicMock, patch

torch.manual_seed(0)

# Mock distributed training environment since we're not actually running distributed code
# We need to mock dist.get_world_size() and dist.all_gather()

original_get_world_size = dist.get_world_size
original_all_gather = dist.all_gather

def mock_get_world_size():
    return 2

def mock_all_gather(output_tensors, tensor):
    # Simulate all_gather by filling output_tensors with copies
    for i in range(len(output_tensors)):
        output_tensors[i].copy_(tensor)

# Patch the distributed functions
dist.get_world_size = mock_get_world_size
dist.all_gather = mock_all_gather

# Create a small tensor for the function
# Shape: (2, 4) - batch size 2, feature dimension 4
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
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 (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
gather_actor Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/dsp.py
code served (permissive licence) · get_code("0e5899df0cd772d3")
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
from torch import Tensor
import numpy as np

torch.manual_seed(0)

# Construct actors: List[Tensor]
# Each tensor has shape (num_actors, time_steps, features)
actors = [
    torch.randn(3, 5, 4),  # batch 0: 3 actors, 5 time steps, 4 features
    torch.randn(2, 5, 4),  # batch 1: 2 actors, 5 time steps, 4 features
]

# Construct pad_flags: List[Tensor]
# Each tensor has shape (num_actors, time_steps)
pad_flags = [
    torch.zeros(3, 5),  # batch 0: 3 actors, 5 time steps
    torch.zeros(2, 5),  # batch 1: 2 actors, 5 time steps
]

# Construct dts: List[Tensor]
# Each tensor has shape (time_steps,) representing delta times
dts = [
    torch.ones(5) * 0.1,  # batch 0: 5 time steps
    torch.ones(5) * 0.1,  # batch 1: 5 time steps
]

ARGS = {
    "actors": actors,
    "pad_flags": pad_flags,
    "dts": dts,
}
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
gather_graph_da Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/dsp.py
code served (permissive licence) · get_code("a0aad832626bffb5")
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 dict. 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)

# Create a minimal graph dict structure
def create_graph(num_nodes, num_edges, device='cpu'):
    graph = {
        'num_nodes': num_nodes,
        'ctrs': torch.randn(num_nodes, 2, device=device),
        'feats': torch.randn(num_nodes, 4, device=device),
        'ms_edges': {
            'scale_1': {
                'u': torch.randint(0, num_nodes, (num_edges,), device=device),
                'v': torch.randint(0, num_nodes, (num_edges,), device=device),
            },
            'scale_2': {
                'u': torch.randint(0, num_nodes, (num_edges,), device=device),
                'v': torch.randint(0, num_nodes, (num_edges,), device=device),
            }
        }
    }
    return graph

# Create a batch of graphs
graphs = [
    create_graph(num_nodes=3, num_edges=5, device='cpu'),
    create_graph(num_nodes=2, num_edges=4, device='cpu'),
]

ARGS = {
    'graphs': graphs,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
gather_graph_ls Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/dsp.py
code served (permissive licence) · get_code("80c8def59ec7c9f9")
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 dict. 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)

# Create sample graphs with the required structure
# Each graph is a dict with num_nodes, feats, turn, control, intersect, ctrs, pre, suc, left, right

graph1 = {
    'num_nodes': 3,
    'feats': torch.randn(3, 4),  # 3 nodes, 4 features
    'turn': torch.randn(3, 4),
    'control': torch.randn(3, 4),
    'intersect': torch.randn(3, 4),
    'ctrs': torch.randn(3, 2),  # 3 nodes, 2D centers
    'pre': [
        {'u': torch.tensor([0, 1]), 'v': torch.tensor([1, 2])},
        {'u': torch.tensor([1]), 'v': torch.tensor([2])},
    ],
    'suc': [
        {'u': torch.tensor([1, 2]), 'v': torch.tensor([0, 1])},
        {'u': torch.tensor([2]), 'v': torch.tensor([1])},
    ],
    'left': {
        'u': torch.tensor([0, 2]),
        'v': torch.tensor([1, 0]),
    },
    'right': {
        'u': torch.tensor([1]),
        'v': torch.tensor([2]),
    },
}

graph2 = {
    'num_nodes': 2,
    'feats': torch.randn(2, 4),  # 2 nodes, 4 features
    'turn': torch.randn(2, 4),
    'control': torch.randn(2, 4),
    'intersect': torch.randn(2, 4),
    'ctrs': torch.randn(2, 2),  # 2 nodes, 2D centers
    'pre': [
        {'u': torch.tensor([0]), 'v': torch.tensor([1])},
        {'u': torch.tensor([]), 'v': torch.tensor([])},
    ],
    'suc': [
        {'u': torch.tensor([1]), 'v': torch.tensor([0])},
        {'u': torch.tensor([]), 'v': torch.tensor([])},
    ],
    'left': {
        'u': torch.tensor([]),
        'v': torch.tensor([]),
    },
    'right': {
        'u': torch.tensor([0]),
        'v': torch.tensor([1]),
    },
}

ARGS = {
    'graphs': [graph1, graph2]
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_pixel_feat Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/layers.py
code served (permissive licence) · get_code("36be051da5af890c")
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)

# fm: feature map with shape (C, H, W)
# Needs to support indexing like fm[:, yli, xli]
fm = torch.randn(4, 8, 6)  # 4 channels, 8 height, 6 width

# bboxes: tensor with shape (N, 2+) where first two columns are x, y positions
# Needs to support indexing like bboxes[:, 0] and bboxes[:, 1]
bboxes = torch.tensor([
    [50.0, 30.0],
    [60.0, 40.0]
], dtype=torch.float32)

# pts_range: sequence/tensor with at least 4 elements [x_min, x_max, y_min, y_max]
pts_range = torch.tensor([0.0, 100.0, 0.0, 80.0], dtype=torch.float32)

ARGS = {
    "fm": fm,
    "bboxes": bboxes,
    "pts_range": pts_range
}
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_roi_feat Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/layers.py
code served (permissive licence) · get_code("1561ad6f3fee9519")
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 4, dtype family float, shape (2, 4, 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 torch
import math

torch.manual_seed(0)

# Feature map: (channels, height, width)
# Using small dimensions: 4 channels, 8x8 spatial
fm = torch.randn(4, 8, 8)

# BEV bboxes: n x 5 (cx, cy, wid, hgt, theta)
# 2 bboxes with distinct dimensions
bboxes = torch.tensor([
    [0.3, 0.4, 0.2, 0.15, math.pi / 6],
    [0.7, 0.6, 0.25, 0.18, math.pi / 4]
], dtype=torch.float32)

# ROI size
roi_size = 4

# pts_range: (x_min, x_max, y_min, y_max, z_min, z_max)
pts_range = (0.0, 1.0, 0.0, 1.0, -1.0, 1.0)

ARGS = {
    "fm": fm,
    "bboxes": bboxes,
    "roi_size": roi_size,
    "pts_range": pts_range
}
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 4, dtype family float, shape (2, 4, 4, 4) — shape (2, 4, 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
linear Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/network_utils.py
code served (permissive licence) · get_code("a69caa173827ffa9")
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 Sequential. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'in_size': 4,
    'out_size': 3,
    'apply_bn': True,
    'activation': 'relu'
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
linear_interp Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/layers.py
code served (permissive licence) · get_code("6bdf1fca41ee9d8e")
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 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

torch.manual_seed(0)

# x: normalized positions ranging from 0 to 1
# Create a small tensor of normalized positions
x = torch.tensor([0.2, 0.5, 0.8, 0.95], dtype=torch.float32)

# n_max: size of the dimension (pixels)
n_max = 10

ARGS = {
    "x": x,
    "n_max": n_max,
}
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 tuple, ndim 2, 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
prob_traj_output Ran
ran on a synthesized input
hkust-aerial-robotics/dsp/networks/network_utils.py
code served (permissive licence) · get_code("6359ce4033b9e24c")
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, 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 torch

torch.manual_seed(0)

# The function takes a tensor x with shape [..., 5]
# where the last dimension has 5 components: muX, muY, sigX, sigY, rho
# It extracts these, applies transformations, and concatenates them back

x = torch.randn(2, 5)

ARGS = {
    "x": x
}
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, 5) — shape (2, 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
distributed_mean Not yet run
unverified (harvested, no recorded run)
hkust-aerial-robotics/dsp/evaluation_ddp.py
code served (permissive licence) · get_code("f687fc7b5858dff0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 8 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_pixel_feat 1 other paper
1 later
Jiao_Semi-supervised_Semantics-guided_Adversarial_Training_for_Robust_Trajectory_Prediction_ICCV_2023_paper (2023 (year only))
Semi-supervised Semantics-guided Adversarial Training for Robust Trajectory Prediction
get_roi_feat 1 other paper
1 later
Jiao_Semi-supervised_Semantics-guided_Adversarial_Training_for_Robust_Trajectory_Prediction_ICCV_2023_paper (2023 (year only))
Semi-supervised Semantics-guided Adversarial Training for Robust Trajectory Prediction
linear_interp 1 other paper
1 later
Jiao_Semi-supervised_Semantics-guided_Adversarial_Training_for_Robust_Trajectory_Prediction_ICCV_2023_paper (2023 (year only))
Semi-supervised Semantics-guided Adversarial Training for Robust Trajectory Prediction

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

Motion prediction for traffic participants is essential for a safe and robust automated driving system, especially in cluttered urban environments. However, it is highly challenging due to the complex road topology as well as the uncertain intentions of the other agents. In this paper, we present a graph-based trajectory prediction network named the Dual Scale Predictor (DSP), which encodes both the static and dynamical driving context in a hierarchical manner. Different from methods based on a rasterized map or sparse lane graph, we consider the driving context as a graph with two layers, focusing on both geometrical and topological features. Graph neural networks (GNNs) are applied to extract features with different levels of granularity, and features are subsequently aggregated with attention-based inter-layer networks, realizing better local-global feature fusion. Following the recent goal-driven trajectory prediction pipeline, goal candidates with high likelihood for the target agent are extracted, and predicted trajectories are generated conditioned on these goals. Thanks to the proposed dual-scale context fusion network, our DSP is able to generate accurate and human-like multi-modal trajectories. We evaluate the proposed method on the large-scale Argoverse motion forecasting benchmark, and it achieves promising results, outperforming the recent state-of-the-art methods.

For agents

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

get_harvested_code_for_paper("2111.01592")
get_code_for_paper("2111.01592")
have("2111.01592")

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

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

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

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

Connect an agent — have() is free.