Papers › RNTrajRec: Road Network Enhanced Trajectory Recovery with Spatial-Temporal Transformer

RNTrajRec: Road Network Enhanced Trajectory Recovery with Spatial-Temporal Transformer

23 Nov 2022arXiv:2211.13234archive 2025-07-28

Yuqi Chen, Hanyuan Zhang, Weiwei Sun, Baihua Zheng

GPS trajectories are the essential foundations for many trajectory-based applications, such as travel time estimation, traffic prediction and trajectory similarity measurement. Most applications require a large amount of high sample rate trajectories to achieve a good performance. However, many real-life trajectories are collected with low sample rate due to energy concern or other constraints.We study the task of trajectory recovery in this paper as a means for increasing the sample rate of low sample trajectories. Currently, most existing works on trajectory recovery follow a sequence-to-sequence diagram, with an encoder to encode a trajectory and a decoder to recover real GPS points in the trajectory. However, these works ignore the topology of road network and only use grid information or raw GPS points as input. Therefore, the encoder model is not able to capture rich spatial information of the GPS points along the trajectory, making the prediction less accurate and lack spatial consistency. In this paper, we propose a road network enhanced transformer-based framework, namely RNTrajRec, for trajectory recovery. RNTrajRec first uses a graph model, namely GridGNN, to learn the embedding features of each road segment. It next develops a spatial-temporal transformer model, namely GPSFormer, to learn rich spatial and temporal features along with a Sub-Graph Generation module to capture the spatial features for each GPS point in the trajectory. It finally forwards the outputs of encoder model into a multi-task decoder model to recover the missing GPS points. Extensive experiments based on three large-scale real-life trajectory datasets confirm the effectiveness of our approach.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2211.13234")

Code

Syntology Ran 8 of 10 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · honoured contract; 7 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

chenyuqi990215/rntrajrec officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 8 ran; 1 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · honoured contract
7ran
2unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from chenyuqi990215/rntrajrec. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Euclidean chenyuqi990215/rntrajrec/preprocess/epsilon_trajectory.py official repository ran fingerprinted MIT (permissive) · 27322694f4514002 · report
epoch_time chenyuqi990215/rntrajrec/multi_main.py official repository ran · honoured contract fingerprinted MIT (permissive) · 3e21e6589663b136 · report
exp_prob chenyuqi990215/rntrajrec/utils/model_utils.py official repository ran fingerprinted MIT (permissive) · acdddab85d978810 · report
getTrajs chenyuqi990215/rntrajrec/multi_train.py official repository ran MIT (permissive) · 13091511b1179f9a · report
get_dict_info_batch chenyuqi990215/rntrajrec/model.py official repository ran MIT (permissive) · 5cb5c9b299bca3a4 · report
get_reachable_inds chenyuqi990215/rntrajrec/utils/model_utils.py official repository ran MIT (permissive) · 95e5cedc8a0ff8de · report
haversine chenyuqi990215/rntrajrec/preprocess/epsilon_trajectory.py official repository ran fingerprinted MIT (permissive) · d318a6bb973f586e · report
mask_log_softmax chenyuqi990215/rntrajrec/model.py official repository ran fingerprinted MIT (permissive) · 2e740dad9477b735 · report
center_geolocation chenyuqi990215/rntrajrec/preprocess/epsilon_trajectory.py official repository unverified MIT (permissive) · bfb3a2261a872bac · report
projectToSegment chenyuqi990215/rntrajrec/preprocess/hmm.py official repository unverified MIT (permissive) · 61c406a953115e52 · report

Tasks

DecoderGraph GenerationTraffic PredictionTravel Time Estimation

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

GPS

1 archive method tag without a method page not shown.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections