SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.01801 · 2024

COLA: Cross-city Mobility Transformer for Human Trajectory Simulation

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 0 have no contract verdict; 3 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/2403.01801.json · badge: /api/ran/2403.01801.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
star607/cross-city-mobility-transformer canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
add_eos_and_pad_seq Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
star607/cross-city-mobility-transformer/helpers.py
code served (permissive licence) · get_code("361154965651b8f6")
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)

# Analyze the function:
# - seqs: a list of sequences (each seq is a list that gets modified)
# - EOS: a token value to append (used when mode == 'add-eos')
# - mode: string, either 'add-eos' or 'no-eos' (default)
# The function modifies seqs in-place, appending EOS token and padding with 0s

# Create test sequences of varying lengths (all < 24)
seqs = [
    [1, 2, 3, 4, 5],           # length 5
    [10, 11, 12]               # length 3
]

EOS = 99  # End-of-sequence token value

mode = 'add-eos'  # Test with add-eos mode

ARGS = {
    'seqs': seqs,
    'EOS': EOS,
    'mode': mode
}
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
new_gelu Ran
ran; our contract draft was wrong, not the code
star607/cross-city-mobility-transformer/cola.py
code served (permissive licence) · get_code("fc681ba4c42604c9")
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
import math

torch.manual_seed(0)

# The function new_gelu takes a single parameter x
# Looking at the body: x is used with torch operations (tanh, pow)
# so x should be a torch tensor

x = torch.randn(2, 4)

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, 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
read_meta_datasets Ran
ran; our contract draft was wrong, not the code
star607/cross-city-mobility-transformer/helpers.py
code served (permissive licence) · get_code("b0b887905aeecf7c")
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 tempfile
import json
import os
import numpy as np

# Create temporary directory structure with required split.json files
temp_dir = tempfile.mkdtemp()

# Create split.json data for each city
def create_city_data(city_name):
    city_dir = os.path.join(temp_dir, city_name)
    os.makedirs(city_dir, exist_ok=True)
    
    split_data = {
        'tra_user': [0, 1, 2],
        'tra_path': [[1, 2, 3], [4, 5], [6, 7, 8, 9]],
        'tra_tim': [[1000, 1100, 1200], [2000, 2100], [3000, 3100, 3200, 3300]],
        'tes_user': [0, 1],
        'tes_path': [[10, 11], [12, 13, 14]],
        'tes_tim': [[4000, 4100], [5000, 5100, 5200]],
        'val_user': [2],
        'val_path': [[15, 16, 17]],
        'val_tim': [[6000, 6100, 6200]],
    }
    
    with open(os.path.join(city_dir, 'split.json'), 'w') as f:
        json.dump(split_data, f)

# Create data for train and test cities
train_cities = ['Singapore', 'New_York']
test_city = 'geolife'

for city in train_cities + [test_city]:
    create_city_data(city)

ARGS = {
    'train_cities': ['Singapore', 'New_York'],
    'test_city': 'geolife',
    'path': temp_dir,
    'dis_type': 'geo'
}
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
set_logger Not yet run
unverified (harvested, no recorded run)
star607/cross-city-mobility-transformer/helpers.py
code served (permissive licence) · get_code("fa693a20fda273a4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 3 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
new_gelu 9 other papers
3 dated earlier, 1 the same month, 5 later
2210.13319 (2022-10)
MARS: Meta-Learning as Score Matching in the Function Space
2307.03381 (2023-07)
Teaching Arithmetic to Small Transformers
2309.07207 (2023-09)
EarthPT: a time series foundation model for Earth Observation
and 6 more not named here

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

Human trajectory data produced by daily mobile devices has proven its usefulness in various substantial fields such as urban planning and epidemic prevention. In terms of the individual privacy concern, human trajectory simulation has attracted increasing attention from researchers, targeting at offering numerous realistic mobility data for downstream tasks. Nevertheless, the prevalent issue of data scarcity undoubtedly degrades the reliability of existing deep learning models. In this paper, we are motivated to explore the intriguing problem of mobility transfer across cities, grasping the universal patterns of human trajectories to augment the powerful Transformer with external mobility data. There are two crucial challenges arising in the knowledge transfer across cities: 1) how to transfer the Transformer to adapt for domain heterogeneity; 2) how to calibrate the Transformer to adapt for subtly different long-tail frequency distributions of locations. To address these challenges, we have tailored a Cross-city mObiLity trAnsformer (COLA) with a dedicated model-agnostic transfer framework by effectively transferring cross-city knowledge for human trajectory simulation. Firstly, COLA divides the Transformer into the private modules for city-specific characteristics and the shared modules for city-universal mobility patterns. Secondly, COLA leverages a lightweight yet effective post-hoc adjustment strategy for trajectory simulation, without disturbing the complex bi-level optimization of model-agnostic knowledge transfer. Extensive experiments of COLA compared to state-of-the-art single-city baselines and our implemented cross-city baselines have demonstrated its superiority and effectiveness. The code is available at https://github.com/Star607/Cross-city-Mobility-Transformer.

For agents

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

get_harvested_code_for_paper("2403.01801")
get_code_for_paper("2403.01801")
have("2403.01801")

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

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

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

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

Connect an agent — have() is free.